MDL related callbacks should be already set when creating mcl. Only update connection status. --- android/health.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/android/health.c b/android/health.c index 7518dad..0327542 100644 --- a/android/health.c +++ b/android/health.c @@ -2001,16 +2001,17 @@ static void mcl_connected(struct mcap_mcl *mcl, gpointer data) static void mcl_reconnected(struct mcap_mcl *mcl, gpointer data) { - GError *gerr = NULL; - bool ret; + struct health_device *dev; DBG(""); - ret = set_mcl_cb(mcl, NULL, &gerr); - if (!ret) { - error("health: error setting mcl callbacks: %s", gerr->message); - g_error_free(gerr); + dev = search_dev_by_mcl(mcl); + if (!dev) { + error("device data does not exists"); + return; } + + dev->mcl_conn = true; } static void mcl_disconnected(struct mcap_mcl *mcl, gpointer data) -- 1.9.1 -- 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