summaryrefslogtreecommitdiff
path: root/android/health.c
diff options
context:
space:
mode:
authorRavi kumar Veeramally <ravikumar.veeramally@linux.intel.com>2014-06-27 00:30:44 +0300
committerSzymon Janc <szymon.janc@tieto.com>2014-06-27 15:30:24 +0200
commitd411e3e01239a84b1706656503647f5362493b5d (patch)
tree8fdef361ca6af0209bde550ce804ef46c025ae6f /android/health.c
parent424b25f1640b6eeeac2e20fdea14de90345cb435 (diff)
downloadbluez-d411e3e01239a84b1706656503647f5362493b5d.tar.gz
android/health: Fix deleting channels queue
Channels queue is created only on device creation. So do not destroy queue on all mdls deleted in mdl_deleted_cb, just remove all entries.
Diffstat (limited to 'android/health.c')
-rw-r--r--android/health.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/android/health.c b/android/health.c
index 3afdf9bc5..717e9a67b 100644
--- a/android/health.c
+++ b/android/health.c
@@ -1088,8 +1088,8 @@ static void mcap_mdl_deleted_cb(struct mcap_mdl *mdl, void *data)
/* mdl == NULL means, delete all mdls */
if (!mdl) {
queue_foreach(dev->channels, notify_channel, NULL);
- queue_destroy(dev->channels, free_health_channel);
- dev->channels = NULL;
+ queue_remove_all(dev->channels, NULL, NULL,
+ free_health_channel);
return;
}