ret = _bt_convert_address_to_string(&remote_address, remote_addr);
if (ret != BT_ERROR_NONE) {
BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
- return ret;
+ break;
}
if (!callback(remote_address, user_data)) {
bt_gatt_h svc = NULL;
bt_gatt_h chr = NULL;
bt_gatt_h desc = NULL;
- char *buf = (char *)&isNotify;
+ char buf[1];
+
+ if (isNotify == true) buf[0] = '1';
+ else buf[0] = '0';
if (_bt_hrp_collector_find(collector_s->remote_address) == NULL)
return BT_ERROR_NOT_INITIALIZED;
return error_code;
}
- bt_gatt_set_value(desc, buf, 2);
+ bt_gatt_set_value(desc, buf, 1);
collector_s->char_update_cb = callback;
ret = bt_get_uuid_name(uuid, &svc);
if (ret != BT_ERROR_NONE)
- svc = g_strdup(uuid);
-
- TC_PRT("Remote deivce [%s] : %s is %s", addr, svc,
+ TC_PRT("Remote device [%s] : %s is %s", addr, svc,
type == BT_GATT_CLIENT_SERVICE_ADDED ?
"Added" : "Removed");
g_free(svc);