Skip to content
Snippets Groups Projects
Commit e61dd070 authored by Tristan Matthews's avatar Tristan Matthews
Browse files

* #6623: don't leak on calls to create_new_call

It calls strdup on its parameters internally.
parent f9641e8f
No related branches found
No related tags found
No related merge requests found
......@@ -237,22 +237,18 @@ row_activated (GtkTreeView *tree_view UNUSED,
WARN ("Row activated - Should not happen!");
break;
}
}
// If history or contact: double click action places a new call
else {
} else {
// If history or contact: double click action places a new call
account_id = g_strdup (selectedCall->_accountID);
// Create a new call
create_new_call (CALL, CALL_STATE_DIALING, "", account_id, selectedCall->_peer_name, selectedCall->_peer_number, &new_call);
// sflphone_place_call(new_call);
calllist_add_call(current_calls, new_call);
calltree_add_call (current_calls, new_call, NULL);
// Function sflphone_place_call (new_call) is processed in process_dialing
sflphone_place_call(new_call);
calltree_display (current_calls);
calltree_display (current_calls);
}
}
} else if (calltab_get_selected_type (active_calltree) == A_CONFERENCE) {
......@@ -1331,11 +1327,6 @@ void calltree_add_conference (calltab_t* tab, conference_obj_t* conf)
g_object_unref (G_OBJECT (pixbuf));
}
/*
if(tab == history) {
return;
}
*/
conference_participant = conf->participant_list;
if (conference_participant) {
......@@ -1347,7 +1338,6 @@ void calltree_add_conference (calltab_t* tab, conference_obj_t* conf)
call_id = (gchar*) (conference_participant->data);
call = calllist_get_call(tab, call_id);
// create_new_call_from_details (conf_id, conference_details, &c);
calltree_remove_call (tab, call, NULL);
calltree_add_call (tab, call, &iter);
......
......@@ -129,12 +129,12 @@ new_call_created_cb (DBusGProxy *proxy UNUSED, const gchar *accountID,
const gchar *callID, const gchar *to, void *foo UNUSED)
{
callable_obj_t *c;
gchar *peer_name = (gchar *)to;
gchar *peer_number = (gchar *)to;
const gchar *peer_name = to;
const gchar *peer_number = to;
DEBUG("DBUS: New Call (%s) created to (%s)", callID, to);
create_new_call(CALL, CALL_STATE_RINGING, g_strdup(callID), g_strdup(accountID),
create_new_call(CALL, CALL_STATE_RINGING, callID, accountID,
peer_name, peer_number, &c);
set_timestamp(&c->_time_start);
......@@ -164,8 +164,8 @@ incoming_call_cb (DBusGProxy *proxy UNUSED, const gchar* accountID,
DEBUG ("DBus incoming peer name: %s", peer_name);
DEBUG ("DBus incoming peer number: %s", peer_number);
create_new_call (CALL, CALL_STATE_INCOMING, g_strdup (callID), g_strdup (
accountID), peer_name, peer_number, &c);
create_new_call (CALL, CALL_STATE_INCOMING, callID, accountID, peer_name,
peer_number, &c);
#if GTK_CHECK_VERSION(2,10,0)
status_tray_icon_blink (TRUE);
popup_main_window();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment