OSDN Git Service

Start listener thread only after successful open call
authorSrinu Jella <sjella@codeaurora.org>
Fri, 22 Jan 2016 12:19:15 +0000 (17:49 +0530)
committerSrinu Jella <sjella@codeaurora.org>
Wed, 16 Mar 2016 13:26:29 +0000 (18:56 +0530)
commit95b9bc0e533545a14cf12877c72e0d96ab4370fd
treeff4a9d746179fa86a622457461c561dabd96b7cb
parentf6a64de84ff3045d6b4e5a9de44da947f597fbb7
Start listener thread only after successful open call

Use case: Stress tests ON\OFF with different concurrent
scenarios

Failure: Crash in btsnoop_net_listen thread

Root cause: While starting and shutting down the module
we are calling same function update_logging(). While at
the start it is creating listen thread and throwing error
and exiting without closing the listen thread. While
shutdown of module it "should_log" matches with "is_logging"
and it considers cleanup is not required and returns,
leaving Behind the listen thread open. In the next BT ON,
another listen thread is created and causes the crash.

Fix: Started listener thread after prerequisite operations
are successful.

Change-Id: I92ef293d9b061d0ea65a0c41b506870152114bb0
hci/src/btsnoop.c