From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: Tue, 9 Jul 2013 09:54:50 +0000 (+0300)
Subject: core/device: Don't call btd_service_disconnect on device_remove
X-Git-Tag: android-x86-4.4-r3~7910
X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=5da7617e7fbd5dd1b3e6f443ab470dda9a26affa;p=android-x86%2Fexternal-bluetooth-bluez.git

core/device: Don't call btd_service_disconnect on device_remove

device_remove is called to cleanup/free the device objects so the
services should be disconnected before hand.
---

diff --git a/src/device.c b/src/device.c
index dbaf548e3..88a7b86b5 100644
--- a/src/device.c
+++ b/src/device.c
@@ -2381,8 +2381,6 @@ void device_remove(struct btd_device *device, gboolean remove_stored)
 	if (device->browse)
 		browse_request_cancel(device->browse);
 
-	g_slist_foreach(device->services, dev_disconn_service, NULL);
-
 	while (device->services != NULL) {
 		struct btd_service *service = device->services->data;