for (l = list; l; l = g_slist_next(l)) {
bt_gatt_common_s *common = (bt_gatt_common_s *)l->data;
bt_get_uuid_name(common->uuid, &name);
- BT_INFO("%s %s [%s]", common->path + 38, common->uuid, name);
g_free(name);
}
return BT_ERROR_NO_DATA;
}
*gatt_handle = l->data;
-
return BT_ERROR_NONE;
}
if (client_s->services)
g_slist_free_full(client_s->services, __bt_gatt_free_service);
+
client_s->services = NULL;
if (prim_svc.count == 0) {
svc->characteristics = g_slist_append(svc->characteristics, chr);
chr->parent = (void *)service;
#ifdef TIZEN_FEATURE_GATT_RELAY
- BT_INFO("Current handle count of service [%d]", svc->numhandles);
-
- svc->numhandles += 2;
+ if (svc) {
+ BT_INFO("Current handle count of service [%d]", svc->numhandles);
+ svc->numhandles += 2;
+ }
#endif
return BT_ERROR_NONE;
}
included_svc);
included_svc->parent = (void *)service;
#ifdef TIZEN_FEATURE_GATT_RELAY
- BT_INFO("Current handle count of service [%d]", svc->numhandles);
-
- svc->numhandles = 1; /* Initalize numhandles to 1 */
+ if (svc) {
+ BT_INFO("Current handle count of service [%d]", svc->numhandles);
+ svc->numhandles = 1; /* Initalize numhandles to 1 */
+ }
#endif
return BT_ERROR_NONE;
g_slist_free_full(serv->services, __bt_gatt_free_service);
serv->services = NULL;
-#ifdef TIZEN_FEATURE_GATT_RELAY
- ret = bluetooth_gatt_server_unregister(instance_id);
-#else
+#ifndef TIZEN_FEATURE_GATT_RELAY
ret = bluetooth_gatt_unregister_application();
#endif
is_gatt_server_started = false;