[PATCH 3/5] android/health: Fix do not set mdl callbacks on mcl_reconneced call back

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux