Skip to content
Snippets Groups Projects
Commit ca2b57cf authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

Duplicate call_t struct when calling back from the mouse event

parent a3e038ee
No related branches found
No related tags found
No related merge requests found
......@@ -195,6 +195,7 @@ call_mailbox( GtkWidget* widget , gpointer data )
update_call_tree_add( current_calls , mailboxCall );
update_menus();
sflphone_place_call( mailboxCall );
if( active_calltree == history ) switch_tab();
}
void
......
......@@ -239,21 +239,24 @@ remove_from_history( void * foo )
static void
call_back( void * foo )
{
call_t* c = call_get_selected( history );
if( c )
call_t* selectedCall = call_get_selected( history );
call_t* newCall = g_new0 (call_t, 1);
if( selectedCall )
{
if(!c->to){
c->to = call_get_number(c);
c->from = g_strconcat("\"\" <", c->to, ">",NULL);
}
newCall->to = g_strdup(call_get_number(selectedCall));
newCall->from = g_strconcat("\"\" <", call_get_number(selectedCall), ">",NULL);
newCall->state = CALL_STATE_DIALING;
newCall->callID = g_new0(gchar, 30);
g_sprintf(newCall->callID, "%d", rand());
newCall->_start = 0;
newCall->_stop = 0;
call_list_add(current_calls, newCall);
update_call_tree_add(current_calls, newCall);
sflphone_place_call(newCall);
switch_tab();
printf("call : from : %s to %s\n", c->from, c->to);
call_list_add(current_calls, c);
update_call_tree_add(current_calls, c);
sflphone_place_call(c);
}
}
GtkWidget *
create_call_menu()
{
......
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