diff options
author | Andrei Emeltchenko <andrei.emeltchenko@intel.com> | 2014-06-24 15:12:02 +0300 |
---|---|---|
committer | Szymon Janc <szymon.janc@tieto.com> | 2014-06-25 17:29:55 +0200 |
commit | 16e27fa445613f75085162d5e43d1357646c7f07 (patch) | |
tree | 3932d16a4ac28a234c8ad3e4e03b1e9df7549c42 /android/health.c | |
parent | c701a30bbedfa333c26758739f95270fae046988 (diff) | |
download | bluez-16e27fa445613f75085162d5e43d1357646c7f07.tar.gz |
android/health: Add setting mcl callbacks for incoming connection
For incoming connection NULL is passed as argument since application is
not known yet.
Diffstat (limited to 'android/health.c')
-rw-r--r-- | android/health.c | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/android/health.c b/android/health.c index df9784886..7281dd5b5 100644 --- a/android/health.c +++ b/android/health.c @@ -1020,6 +1020,9 @@ static void mcap_mdl_deleted_cb(struct mcap_mdl *mdl, void *data) DBG(""); + if (!channel) + return; + dev = channel->dev; /* mdl == NULL means, delete all mdls */ if (!mdl) { @@ -1540,12 +1543,30 @@ static const struct ipc_handler cmd_handlers[] = { static void mcl_connected(struct mcap_mcl *mcl, gpointer data) { - DBG("Not implemented"); + GError *gerr = NULL; + bool ret; + + DBG(""); + + ret = set_mcl_cb(mcl, NULL, &gerr); + if (!ret) { + error("health: error setting mcl callbacks: %s", gerr->message); + g_error_free(gerr); + } } static void mcl_reconnected(struct mcap_mcl *mcl, gpointer data) { - DBG("Not implemented"); + GError *gerr = NULL; + bool ret; + + DBG(""); + + ret = set_mcl_cb(mcl, NULL, &gerr); + if (!ret) { + error("health: error setting mcl callbacks: %s", gerr->message); + g_error_free(gerr); + } } static void mcl_disconnected(struct mcap_mcl *mcl, gpointer data) |