aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--attrib/client.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/attrib/client.c b/attrib/client.c
index 265625e0..d695e235 100644
--- a/attrib/client.c
+++ b/attrib/client.c
@@ -415,11 +415,6 @@ static DBusMessage *register_watcher(DBusConnection *conn,
GIOChannel *io;
char *path;
- if (gatt->attrib != NULL) {
- gatt->attrib = g_attrib_ref(gatt->attrib);
- goto done;
- }
-
if (!dbus_message_get_args(msg, NULL, DBUS_TYPE_OBJECT_PATH, &path,
DBUS_TYPE_INVALID))
return NULL;
@@ -428,6 +423,11 @@ static DBusMessage *register_watcher(DBusConnection *conn,
return g_dbus_create_error(msg, ERROR_INTERFACE ".Failed",
"Invalid path");
+ if (gatt->attrib != NULL) {
+ gatt->attrib = g_attrib_ref(gatt->attrib);
+ goto done;
+ }
+
/*
* FIXME: If the service doesn't support Client Characteristic
* Configuration it is necessary to poll the server from time