summaryrefslogtreecommitdiffstats
path: root/core/jni/android_bluetooth_common.h
diff options
context:
space:
mode:
authorJaikumar Ganesh <jaikumar@google.com>2010-03-31 11:23:49 -0700
committerJaikumar Ganesh <jaikumar@google.com>2010-03-31 11:29:18 -0700
commitb8aa037602eff1fe5fbc9cce07a6f9bc34d19a3e (patch)
treee96321a149fce739287328fd90494cd1eacce029 /core/jni/android_bluetooth_common.h
parent0e09030977aea8b40fd177139528d4b5637c9771 (diff)
downloadframeworks_base-b8aa037602eff1fe5fbc9cce07a6f9bc34d19a3e.zip
frameworks_base-b8aa037602eff1fe5fbc9cce07a6f9bc34d19a3e.tar.gz
frameworks_base-b8aa037602eff1fe5fbc9cce07a6f9bc34d19a3e.tar.bz2
Fix crash while turning bluetooth on, due to a race condition.
Bug: 2561150 Race condition: We were basing whether the event loop is running or not on whether nat->pollData was null or not. In rare cases, eventLoopMain would have not started, isEventLoopRunning returns true; java side makes a dbus call and the watches get set to null, causing a crash in dbus_connection_set_watch_functions when eventLoopMain starts. Change-Id: I863f182185a8e956fd53cb58783b7fe0ecfb2ddb
Diffstat (limited to 'core/jni/android_bluetooth_common.h')
-rw-r--r--core/jni/android_bluetooth_common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/jni/android_bluetooth_common.h b/core/jni/android_bluetooth_common.h
index ef9b66b..378bb6f 100644
--- a/core/jni/android_bluetooth_common.h
+++ b/core/jni/android_bluetooth_common.h
@@ -88,6 +88,8 @@ struct event_loop_native_data_t {
int envVer;
/* reference to our java self */
jobject me;
+ /* flag to indicate if the event loop thread is running */
+ bool running;
};
struct _Properties {