auto import from //depot/cupcake/@136594
diff --git a/hcidump/Android.mk b/hcidump/Android.mk
index 32cbc26..2049e44 100755
--- a/hcidump/Android.mk
+++ b/hcidump/Android.mk
@@ -33,7 +33,7 @@
libbluetooth
LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
-LOCAL_MODULE_TAGS := eng
+LOCAL_MODULE_TAGS := debug
LOCAL_MODULE:=hcidump
include $(BUILD_EXECUTABLE)
diff --git a/utils/audio/a2dp.c b/utils/audio/a2dp.c
index 3490b81..90212b3 100644
--- a/utils/audio/a2dp.c
+++ b/utils/audio/a2dp.c
@@ -89,6 +89,7 @@
GSList *cb;
int ref;
guint idle;
+ guint reconfigure_timeout;
};
static DBusConnection *connection = NULL;
@@ -136,6 +137,8 @@
if (setup->ref <= 0) {
if (setup->idle)
g_source_remove(setup->idle);
+ if (setup->reconfigure_timeout)
+ g_source_remove(setup->reconfigure_timeout);
setup_free(setup);
}
}
@@ -758,6 +761,13 @@
GSList *l;
int posix_err;
+ if (!g_slist_find(setups, setup)) {
+ error("unknown setup in a2dp_reconfigure");
+ return FALSE;
+ }
+
+ setup->reconfigure_timeout = 0;
+
for (l = setup->client_caps; l != NULL; l = l->next) {
cap = l->data;
@@ -817,8 +827,12 @@
return;
}
- if (setup->reconfigure)
- g_timeout_add(RECONFIGURE_TIMEOUT, a2dp_reconfigure, setup);
+ if (setup->reconfigure) {
+ if (setup->reconfigure_timeout)
+ g_source_remove(setup->reconfigure_timeout);
+ setup->reconfigure_timeout = g_timeout_add(RECONFIGURE_TIMEOUT,
+ a2dp_reconfigure, setup);
+ }
}
static gboolean abort_ind(struct avdtp *session, struct avdtp_local_sep *sep,