}
void _bt_convert_addr_string_to_type_rev(unsigned char *addr,
- const char *address)
+ const char *address)
{
- int i;
- char *ptr = NULL;
+ int i;
+ char *ptr = NULL;
ret_if(address == NULL);
ret_if(addr == NULL);
- for (i = 0; i < 6; i++) {
- addr[5 - i] = strtol(address, &ptr, 16);
- if (ptr[0] != '\0') {
- if (ptr[0] != ':')
- return;
+ for (i = 0; i < 6; i++) {
+ addr[5 - i] = strtol(address, &ptr, 16);
+ if (ptr[0] != '\0') {
+ if (ptr[0] != ':')
+ return;
- address = ptr + 1;
- }
- }
+ address = ptr + 1;
+ }
+ }
}
static gboolean __bt_ag_check_nval(GIOChannel *chan)
bt_ag_slconn_t *slconn = hs->slc;
/*guint watch_id;*/
+ if (hs->state == HEADSET_STATE_ON_CALL)
+ return BT_HFP_AGENT_ERROR_ALREADY_CONNECTED;
+
if (hs->state != HEADSET_STATE_CONNECTED)
return BT_HFP_AGENT_ERROR_NOT_CONNECTED;
#ifdef TIZEN_MEDIA_ENHANCE
if (err < 0) {
ERR("ERROR: sco socket set socket option failed");
ERR("Close SCO skt");
+ g_io_channel_unref(io);
close(sco_skt);
return BT_HFP_AGENT_ERROR_INTERNAL;
}
if (err < 0 && !(errno == EINPROGRESS || errno == EAGAIN)) {
ERR("ERROR: sco socket connect failed : %d", err);
ERR("Close SCO skt");
+ g_io_channel_unref(io);
close(sco_skt);
return BT_HFP_AGENT_ERROR_INTERNAL;
}
FN_START;
GError *error = NULL;
guint owner_id;
- GDBusNodeInfo *node_info;
+ GDBusNodeInfo *node_info = NULL;
gchar *path;
owner_id = g_bus_own_name(G_BUS_TYPE_SYSTEM,
ERR("Failed to register: %s", error->message);
g_error_free(error);
g_free(path);
+ g_dbus_node_info_unref(node_info);
return FALSE;
}
g_free(path);
ERR("Failed to register: %s", error->message);
g_error_free(error);
g_free(path);
+ g_dbus_node_info_unref(node_info);
return FALSE;
}
g_free(path);
+ g_dbus_node_info_unref(node_info);
node_info = __bt_ag_create_method_node_info
(ag_agent_app_introspection_xml);
ERR("Failed to register: %s", error->message);
g_error_free(error);
g_free(path);
+ g_dbus_node_info_unref(node_info);
return FALSE;
}
g_free(path);
+ g_dbus_node_info_unref(node_info);
FN_END;
return TRUE;