if (data_len == 0) {
BT_ERR("No data");
- if (var)
- g_variant_unref(var);
+ g_variant_unref(var);
return;
}
{
hid_connected_device_info_t *info = data;
GIOStatus status = G_IO_STATUS_NORMAL;
- char buffer[20];
+ char buffer[BT_RFCOMM_BUFFER_LEN];
gsize len = 0;
GError *err = NULL;
guint8 header, type, param;
otp_gproxy = _bt_core_gdbus_get_otp_proxy();
if (!otp_gproxy) {
BT_DBG("Couldn't get service proxy");
+ g_free(base_dir);
return BLUETOOTH_ERROR_INTERNAL;
}
/* Send the event to application */
_bt_send_event(BT_OTP_EVENT,
- BLUETOOTH_EVENT_OTP_SERVER_STATE_CHANGED,
- param);
+ BLUETOOTH_EVENT_OTP_SERVER_STATE_CHANGED,
+ param);
- out_param = g_variant_new_from_data((const GVariantType *)"i",
+ if (req_info) {
+ out_param = g_variant_new_from_data((const GVariantType *)"i",
result, sizeof(int), TRUE, NULL, NULL);
- g_dbus_method_invocation_return_value(req_info->context,
+ g_dbus_method_invocation_return_value(req_info->context,
g_variant_new("(iv)", status, out_param));
- _bt_delete_request_list(req_info->req_id);
+ _bt_delete_request_list(req_info->req_id);
+ }
+
g_variant_unref(result);
if (otp_gproxy) {
if (error) {
BT_ERR("Error : %s \n", error->message);
- g_free(address);
if (info) {
req_info = _bt_get_request_info(info->req_id);
__bt_tds_remove_data_read_req_info(info);
perms, props, &char_obj_path);
TC_PRT("characteristic obj_path is %s", char_obj_path);
-
+ g_free(char_uuid);
break;
}
case 96: {
char *desc_uuid = g_strdup("000026ff-0000-1000-8000-00805f9b34fb");
bt_gatt_permission_t perms = BLUETOOTH_GATT_PERMISSION_READ |
- BLUETOOTH_GATT_PERMISSION_WRITE;
+ BLUETOOTH_GATT_PERMISSION_WRITE;
ret = bluetooth_gatt_add_descriptor(char_obj_path,
- desc_uuid, perms, &desc_obj_path);
- TC_PRT("add descriptor error is %d", ret);
+ desc_uuid, perms, &desc_obj_path);
+ TC_PRT("add descriptor error is %d", ret);
+ g_free(desc_uuid);
break;
}