address = g_malloc0(BT_ADDRESS_STRING_SIZE);
_bt_convert_device_path_to_address(path, address);
- dev_name = _bt_get_bonded_device_name(address);
+ dev_name = _bt_get_device_name(address);
_bt_convert_addr_string_to_secure_string(secure_address, address);
BT_INFO("Address : %s Type : %d", secure_address, addr_type);
gboolean connected;
#endif
bt_headset_wait_t *wait_list;
- guint restricted = 0x0;
+ guint trusted = TRUE;
__bt_set_device_values(TRUE,
VCONFKEY_BT_DEVICE_A2DP_HEADSET_CONNECTED);
__bt_connection_manager_set_state(address, event);
- _bt_get_restrict_profile(&bd_addr, RESTRICTED_PROFILE_HFP_HS, &restricted);
+ _bt_get_trust_profile(&bd_addr, TRUSTED_PROFILE_HFP_HF, &trusted);
if (_bt_headset_get_local_connection() == FALSE) {
- if (restricted == 0x0) /* not restricted*/
+ if (trusted == TRUE) /* not restricted*/
_bt_start_timer_for_connection(address, BT_AUDIO_HSP);
} else {
/* Connection Started from local device therefore no need to
param = g_variant_new("(iss)", result, address, ifname);
ipsp_param = g_variant_new("(ss)", ifname, address);
+ g_free(ifname);
+
/* Set Ipv6 Addr */
GDBusProxy *ipsp_proxy;
if (connected) {
if (ipsp_proxy == NULL) {
BT_ERR("can not get ipsp proxy");
g_free(address);
+ g_variant_unref(param);
+ g_variant_unref(ipsp_param);
return;
}
ipsp_param, G_DBUS_CALL_FLAGS_NONE,
-1, NULL, NULL, NULL);
} else {
+ g_variant_unref(ipsp_param);
BT_DBG("IPSP disconnected");
ipsp_proxy = _bt_get_ipsp_proxy();
if (ipsp_proxy == NULL) {
BT_ERR("can not get ipsp proxy");
g_free(address);
+ g_variant_unref(param);
return;
}
}
/* Send event to application */
- _bt_send_event(BT_DEVICE_EVENT,
- event,
- param);
+ _bt_send_event(BT_DEVICE_EVENT, event, param);
g_free(address);
} else if (strcasecmp(member, "AttMtuChanged") == 0) {
int result = BLUETOOTH_ERROR_NONE;
/* Set the headset name */
if (connected == TRUE)
- name = _bt_get_bonded_device_name(address);
+ name = _bt_get_device_name(address);
else
name = g_strdup("");
int event = BLUETOOTH_EVENT_NONE;
bt_headset_wait_t *wait_list;
char *address;
- guint restricted = 0x0;
+ guint trusted = TRUE;
g_variant_get(value, "b", &property_flag);
address = g_malloc0(BT_ADDRESS_STRING_SIZE);
if (property_flag == TRUE) {
event = BLUETOOTH_EVENT_AG_CONNECTED;
- _bt_get_restrict_profile(&bd_addr, RESTRICTED_PROFILE_A2DP, &restricted);
+ _bt_get_trust_profile(&bd_addr, TRUSTED_PROFILE_A2DP, &trusted);
if (_bt_headset_get_local_connection() == FALSE) {
- if (restricted == 0x0) /* not restricted*/
+ if (trusted == TRUE) /* not restricted*/
_bt_start_timer_for_connection(address, BT_AUDIO_A2DP);
} else
_bt_headset_set_local_connection(FALSE);