diff --git a/sflphone-client-gnome/src/actions.c b/sflphone-client-gnome/src/actions.c index 02df4fc031716afdac06714d26350788b116e5ac..42e1cdef68c4a3e49e5b3ffaec78fee413f84299 100644 --- a/sflphone-client-gnome/src/actions.c +++ b/sflphone-client-gnome/src/actions.c @@ -647,12 +647,10 @@ process_dialing (callable_obj_t *c, guint keyval, gchar *key) //dbus_play_dtmf( key ); } - DEBUG ("--------------------- SFLphone: process dialing : keyval: %d", keyval); - DEBUG ("--------------------- SFLphone: process dialing : key: %s", key); - switch (keyval) { case 65293: /* ENTER */ case 65421: /* ENTER numpad */ + DEBUG("------------------------------------------------ SFLPHONE PLACE CALL (process dialing)"); sflphone_place_call (c); break; case 65307: /* ESCAPE */ @@ -961,13 +959,13 @@ sflphone_place_call (callable_obj_t * c) { gchar *msg = ""; - DEBUG ("Actions: Placing call with %s @ %s and accountid %s", c->_peer_name, c->_peer_number, c->_accountID); - if (c == NULL) { DEBUG ("Actions: Unexpected condition: callable_obj_t is null in %s at %d", __FILE__, __LINE__); return; } + DEBUG ("Actions: Placing call with %s @ %s and accountid %s", c->_peer_name, c->_peer_number, c->_accountID); + if (_is_direct_call (c)) { msg = g_markup_printf_escaped (_ ("Direct SIP call")); statusbar_pop_message (__MSG_ACCOUNT_DEFAULT); diff --git a/sflphone-client-gnome/src/contacts/calltree.c b/sflphone-client-gnome/src/contacts/calltree.c index 5d56978770c29917e14b65260bc49fc5c4b828ca..5410fd9fddea007ad2d8ccf42cf61f914cef2f31 100644 --- a/sflphone-client-gnome/src/contacts/calltree.c +++ b/sflphone-client-gnome/src/contacts/calltree.c @@ -207,13 +207,9 @@ row_activated (GtkTreeView *tree_view UNUSED, selectedCall = calltab_get_selected_call (active_calltree); if (selectedCall) { - DEBUG ("CallTree: Selected a call"); - // Get the right event from the right calltree if (active_calltree == current_calls) { - DEBUG ("CallTree: Active tree is current calls"); - switch (selectedCall->_state) { case CALL_STATE_INCOMING: dbus_accept (selectedCall); @@ -229,7 +225,6 @@ row_activated (GtkTreeView *tree_view UNUSED, break; case CALL_STATE_DIALING: sflphone_place_call (selectedCall); - DEBUG("---------------------------- PLACING A NEW CALL FROM ROW ACTIVATED (current_calls)"); break; default: WARN ("Row activated - Should not happen!"); @@ -240,26 +235,22 @@ row_activated (GtkTreeView *tree_view UNUSED, // If history or contact: double click action places a new call else { - DEBUG ("CallTree: Active tree is history or contact"); - 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); - DEBUG("------------------------------------ PLACING A NEW CALL FROM ROW ACTIVATED (history)"); // sflphone_place_call(new_call); calllist_add (current_calls, new_call); calltree_add_call (current_calls, new_call, NULL); // Function sflphone_place_call (new_call) is processed in process_dialing + DEBUG("------------------------------------ PLACING A NEW CALL FROM ROW ACTIVATED (history)"); sflphone_place_call(new_call); calltree_display (current_calls); } } } else if (calltab_get_selected_type (current_calls) == A_CONFERENCE) { - DEBUG ("CallTree: Selected a conference"); - if (active_calltree == current_calls) { selectedConf = calltab_get_selected_conf (current_calls); diff --git a/sflphone-client-gnome/src/mainwindow.c b/sflphone-client-gnome/src/mainwindow.c index 2f837c8a629da32e13a59eec15759948d0ac3ea3..d46daed0a3e85e3b34bd98abaaec7b55a19447b4 100644 --- a/sflphone-client-gnome/src/mainwindow.c +++ b/sflphone-client-gnome/src/mainwindow.c @@ -135,14 +135,11 @@ on_key_released (GtkWidget *widget, GdkEventKey *event, gpointer user_data UNUSE if (focus_is_on_searchbar == FALSE) { if(event->keyval == 65293) { - DEBUG("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); if(active_calltree == current_calls) { - DEBUG("Active calltree is current_calls"); sflphone_keypad (event->keyval, event->string); return TRUE; } else if(active_calltree == history) { - DEBUG("Active calltree is history"); return FALSE; } } diff --git a/sflphone-common/src/managerimpl.cpp b/sflphone-common/src/managerimpl.cpp index 7e8a33ccf6f9fdbca000832af68d4582b0eb0572..a4467fb1dbb292fc801cc9177473c25887f6621a 100644 --- a/sflphone-common/src/managerimpl.cpp +++ b/sflphone-common/src/managerimpl.cpp @@ -248,6 +248,13 @@ bool ManagerImpl::outgoingCall (const std::string& account_id, return false; } + // Call ID must be unique + if (getAccountFromCall (call_id) != AccountNULL) { + _error ("Manager: Error: Call id already exists in outgoing call"); + return false; + } + + _debug ("Manager: New outgoing call %s to %s", call_id.c_str(), to.c_str()); CallID current_call_id = getCurrentCallId(); @@ -298,12 +305,6 @@ bool ManagerImpl::outgoingCall (const std::string& account_id, return false; } - // Call ID must be unique - if (getAccountFromCall (call_id) != AccountNULL) { - _error ("Manager: Error: Call id already exists in outgoing call"); - return false; - } - if(!associateCallToAccount (call_id, account_id)) { _warn("Manager: Warning: Could not associate call id %s to account id %s", call_id.c_str(), account_id.c_str()); }