[RFC 2/5] android/health: Implement mdl_closed_cb callback

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

 



Callback will be called when data channel is disconnected/closed.
It does not mean that it is deleted. So only change connected status.
---
 android/health.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/android/health.c b/android/health.c
index 30a6166..3afdf9b 100644
--- a/android/health.c
+++ b/android/health.c
@@ -1057,7 +1057,14 @@ static void mcap_mdl_connected_cb(struct mcap_mdl *mdl, void *data)
 
 static void mcap_mdl_closed_cb(struct mcap_mdl *mdl, void *data)
 {
-	DBG("Not Implemeneted");
+	struct health_channel *channel = data;
+
+	info("MDL closed");
+
+	if (!channel)
+		return;
+
+	channel->mdl_conn = false;
 }
 
 static void notify_channel(void *data, void *user_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