From: Andrei Emeltchenko <andrei.emeltchenko@xxxxxxxxx> For incoming connection NULL is passed as argument since application is not known yet. --- android/health.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/android/health.c b/android/health.c index df97848..7281dd5 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) -- 1.8.3.2 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html