[PATCH BlueZ] core/device: Fix not responding to Connect

DORMANTno replies

From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Date: 2015-11-09 12:57:02
Subsystem: the rest · Maintainer: Linus Torvalds

From: Luiz Augusto von Dentz <redacted>

If profile is removed while its connection is pending it shall not be
removed directly from pending list since service_remove should first
notify the error which will end up in device_profile_connected that
will take care of cleaning up properly and respond to Connect if
necessary.
---
 src/device.c | 2 --
 1 file changed, 2 deletions(-)
diff --git a/src/device.c b/src/device.c
index 6722976..16cbdcf 100644
--- a/src/device.c
+++ b/src/device.c
@@ -3320,7 +3320,6 @@ static void device_remove_gatt_service(struct btd_device *device,
 
 	service = l->data;
 	device->services = g_slist_delete_link(device->services, l);
-	device->pending = g_slist_remove(device->pending, service);
 	service_remove(service);
 }
 
@@ -4045,7 +4044,6 @@ void device_remove_profile(gpointer a, gpointer b)
 
 	service = l->data;
 	device->services = g_slist_delete_link(device->services, l);
-	device->pending = g_slist_remove(device->pending, service);
 	service_remove(service);
 }
 
-- 
2.4.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help