}
g_free(folders_struct.names);
+ g_variant_iter_free(iter);
g_variant_unref(folder_list_var);
} else if (strcasecmp(signal_name, BT_MAP_FILTER_FIELDS_COMPLETE) == 0) {
fields_info.fields[i] = strdup(field);
i++;
}
+ g_variant_iter_free(iter);
}
_bt_common_event_cb(BLUETOOTH_EVENT_MAP_LIST_FILTER_FIELD_COMPLETE,
messages_struct.message_items[i].is_protected = value_bool ? 1 : 0;
BT_DBG(" Protected: %s", value_bool ? "true" : "false");
}
+
+ g_free(value_string);
}
++i;
}
+ g_variant_iter_free(iter);
_bt_common_event_cb(BLUETOOTH_EVENT_MAP_LIST_MESSAGES_COMPLETE,
result, &messages_struct,
_bt_gatt_client_event_cb(BLUETOOTH_EVENT_GATT_CHAR_VAL_CHANGED,
result, &char_prop,
event_info->cb, event_info->user_data);
+
+ g_variant_unref(svc_uuid_var);
+ g_variant_unref(char_uuid_var);
+ g_variant_unref(data_var);
+
} else if (strcasecmp(signal_name, BT_GATT_CLIENT_READ_CHAR) == 0) { /* Done */
/* Event: BLUETOOTH_EVENT_GATT_READ_CHAR */
BT_DBG("GATT Client event[BT_GATT_CLIENT_READ_CHAR]");
_bt_gatt_client_event_cb(BLUETOOTH_EVENT_GATT_READ_CHAR,
result, &char_prop,
event_info->cb, event_info->user_data);
+
+ g_variant_unref(svc_uuid_var);
+ g_variant_unref(char_uuid_var);
+ g_variant_unref(data_var);
+
} else if (strcasecmp(signal_name, BT_GATT_CLIENT_WRITE_CHAR) == 0) { /* Done */
/* Event: BLUETOOTH_EVENT_GATT_WRITE_CHAR */
BT_DBG("GATT Client event[BT_GATT_CLIENT_WRITE_CHAR]");
_bt_gatt_client_event_cb(BLUETOOTH_EVENT_GATT_WRITE_CHAR,
result, &char_prop,
event_info->cb, event_info->user_data);
+
+ g_variant_unref(svc_uuid_var);
+ g_variant_unref(char_uuid_var);
+
} else if (strcasecmp(signal_name, BT_GATT_CLIENT_READ_DESC) == 0) { /* Done */
/* Event: BLUETOOTH_EVENT_GATT_READ_DESC */
BT_DBG("GATT Client event[BT_GATT_CLIENT_READ_DESC]");
_bt_gatt_client_event_cb(BLUETOOTH_EVENT_GATT_READ_DESC,
result, &desc_prop,
event_info->cb, event_info->user_data);
+
+ g_variant_unref(svc_uuid_var);
+ g_variant_unref(char_uuid_var);
+ g_variant_unref(desc_uuid_var);
+ g_variant_unref(data_var);
+
} else if (strcasecmp(signal_name, BT_GATT_CLIENT_WRITE_DESC) == 0) { /* Done */
/* Event: BLUETOOTH_EVENT_GATT_WRITE_DESC */
BT_DBG("GATT Client event[BT_GATT_CLIENT_WRITE_DESC]");
_bt_gatt_client_event_cb(BLUETOOTH_EVENT_GATT_WRITE_DESC,
result, &desc_prop,
event_info->cb, event_info->user_data);
+
+ g_variant_unref(svc_uuid_var);
+ g_variant_unref(char_uuid_var);
+ g_variant_unref(desc_uuid_var);
+
} else if (strcasecmp(signal_name, BT_GATT_CLIENT_SERVICE_CHANGED) == 0) {
BT_DBG("GATT Client event[BT_GATT_CLIENT_SERVICE_CHANGED]");
bt_gatt_service_change_t change = {0, };
char *address_str = NULL;
char *name = NULL;
- g_variant_get(parameters, "(i&s&s)", &change.change_type, &address_str, &change.uuid);
+ g_variant_get(parameters, "(ii&s&s)", &change.inst_id, &change.change_type, &address_str, &change.uuid);
_bt_convert_addr_string_to_type(change.device_addr.addr, address_str);
bluetooth_get_uuid_name(change.uuid, &name);
_bt_gatt_server_event_cb(BLUETOOTH_EVENT_GATT_SERVER_VALUE_CHANGED,
BLUETOOTH_ERROR_NONE, &write_info,
event_info->cb, event_info->user_data);
+
+ g_variant_unref(data_var);
} else if (strcasecmp(signal_name, BT_GATT_SERVER_READ_REQ) == 0) {
const char *address = NULL;
bluetooth_device_address_t dev_address = { {0} };