aboutsummaryrefslogtreecommitdiffstats
path: root/attrib/client.c
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2010-11-04 19:43:30 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2010-11-05 07:00:44 +0200
commit1d723ac244e805632872cae6b87a7a9b76b4999d (patch)
tree1c485bcaaa9ab101a9f01892582aa54db29a89db /attrib/client.c
parentb9b0e471f245d2a5da4a04c4d2219ebcc9c89939 (diff)
downloadbluez-1d723ac244e805632872cae6b87a7a9b76b4999d.tar.gz
bluez-1d723ac244e805632872cae6b87a7a9b76b4999d.tar.xz
bluez-1d723ac244e805632872cae6b87a7a9b76b4999d.zip
Fix invalid reference to GATT service structure
Diffstat (limited to 'attrib/client.c')
-rw-r--r--attrib/client.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/attrib/client.c b/attrib/client.c
index bcc903b4..1f2c2174 100644
--- a/attrib/client.c
+++ b/attrib/client.c
@@ -1342,13 +1342,9 @@ int attrib_client_register(struct btd_device *device, int psm)
bacpy(&gatt->dba, &dba);
gatt->psm = psm;
- gatt_services = g_slist_append(gatt_services, gatt);
-
- /* FIXME: we should also listen for incoming connections */
-
if (load_primary_services(gatt)) {
DBG("Primary services loaded");
- return 0;
+ goto done;
}
if (psm < 0) {
@@ -1385,6 +1381,9 @@ int attrib_client_register(struct btd_device *device, int psm)
g_attrib_set_disconnect_function(gatt->attrib, attrib_disconnect,
gatt);
+done:
+ gatt_services = g_slist_append(gatt_services, gatt);
+
return 0;
}