Thread (9 messages) 9 messages, 1 author, 2016-09-13

[PATCH BlueZ 7/8] deviceinfo: Implement disconnect callback

flat view
STALE3691d

From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Date: 2016-09-12 14:07:38
Subsystem: the rest · Maintainer: Linus Torvalds

From: Luiz Augusto von Dentz <redacted>

This implements the profile disconnect so the service state is updated
properly.
---
 profiles/deviceinfo/deviceinfo.c | 8 ++++++++
 1 file changed, 8 insertions(+)
diff --git a/profiles/deviceinfo/deviceinfo.c b/profiles/deviceinfo/deviceinfo.c
index 34d9e20..0ce7edb 100644
--- a/profiles/deviceinfo/deviceinfo.c
+++ b/profiles/deviceinfo/deviceinfo.c
@@ -141,6 +141,13 @@ static int deviceinfo_driver_accept(struct btd_service *service)
 	return 0;
 }
 
+static int deviceinfo_disconnect(struct btd_service *service)
+{
+	btd_service_disconnecting_complete(service, 0);
+
+	return 0;
+}
+
 static struct btd_profile deviceinfo_profile = {
 	.name		= "deviceinfo",
 	.remote_uuid	= DEVICE_INFORMATION_UUID,
@@ -148,6 +155,7 @@ static struct btd_profile deviceinfo_profile = {
 	.device_probe	= deviceinfo_driver_probe,
 	.device_remove	= deviceinfo_driver_remove,
 	.accept		= deviceinfo_driver_accept,
+	.disconnect	= deviceinfo_disconnect,
 };
 
 static int deviceinfo_init(void)
-- 
2.7.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help