Thread (2 messages) 2 messages, 1 author, 2016-08-09

[PATCH BlueZ] core/service: Fix setting connecting state

STALE3710d

From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Date: 2016-08-08 10:41:00
Subsystem: the rest · Maintainer: Linus Torvalds

From: Luiz Augusto von Dentz <redacted>

If the profile don't implement .accept callback it means it cannot
connect in this mode, which is normally used for GATT profiles, so the
code shall not assume the profile will be connecting and instead just
return an error.
---
 src/service.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/service.c b/src/service.c
index 0da14ab..f387fc4 100644
--- a/src/service.c
+++ b/src/service.c
@@ -197,7 +197,7 @@ int service_accept(struct btd_service *service)
 	}
 
 	if (!service->profile->accept)
-		goto done;
+		return -ENOSYS;
 
 	err = service->profile->accept(service);
 	if (!err)
-- 
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