From 82f4e9057d353245f3e1603cf7da63001f4a5ea4 Mon Sep 17 00:00:00 2001 From: pierre-luc <pierre-luc@aqra.ca> Date: Fri, 24 Jul 2009 12:06:13 -0400 Subject: [PATCH] [#1905] The daemon was not sending the currentSelectedCodec signal on dbus when answering a call. Also, messages were not always pop out of the stack properly. --- sflphone-client-gnome/src/actions.c | 5 ++++- sflphone-client-gnome/src/callable_obj.c | 1 - sflphone-client-gnome/src/dbus/dbus.c | 1 + sflphone-common/src/managerimpl.cpp | 5 ++++- sflphone-common/src/sipvoiplink.cpp | 2 +- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/sflphone-client-gnome/src/actions.c b/sflphone-client-gnome/src/actions.c index 4e632c9ca2..5126356e80 100644 --- a/sflphone-client-gnome/src/actions.c +++ b/sflphone-client-gnome/src/actions.c @@ -303,7 +303,9 @@ sflphone_hang_up() sflphone_pick_up() { DEBUG("sflphone_pick_up\n"); - callable_obj_t * selectedCall = calltab_get_selected_call(active_calltree); + callable_obj_t * selectedCall = NULL; + selectedCall = calltab_get_selected_call(active_calltree); + if(selectedCall) { switch(selectedCall->_state) @@ -802,6 +804,7 @@ sflphone_display_selected_codec (const gchar* codecName) selectedCall = calltab_get_selected_call(current_calls); if (selectedCall) { if(selectedCall->_accountID != NULL){ + statusbar_pop_message(__MSG_ACCOUNT_DEFAULT); acc = account_list_get_by_id(selectedCall->_accountID); if (!acc) { msg = g_markup_printf_escaped (_("IP call - %s"), codecName); diff --git a/sflphone-client-gnome/src/callable_obj.c b/sflphone-client-gnome/src/callable_obj.c index 8cff3894f7..7332c87ba6 100644 --- a/sflphone-client-gnome/src/callable_obj.c +++ b/sflphone-client-gnome/src/callable_obj.c @@ -243,7 +243,6 @@ gchar* get_call_duration (callable_obj_t *obj) duration = (int) difftime(end, start); - DEBUG("END: %d START: %d DURATION: %d", end, start, duration); if( duration / 60 == 0 ) { if( duration < 10 ) diff --git a/sflphone-client-gnome/src/dbus/dbus.c b/sflphone-client-gnome/src/dbus/dbus.c index ad4fc09a2a..b4ad2226df 100644 --- a/sflphone-client-gnome/src/dbus/dbus.c +++ b/sflphone-client-gnome/src/dbus/dbus.c @@ -129,6 +129,7 @@ call_state_cb (DBusGProxy *proxy UNUSED, stop_notification(); sflphone_hung_up (c); calltree_update_call( history, c ); + status_bar_display_account(); } else if ( strcmp(state, "UNHOLD_CURRENT") == 0 ) { diff --git a/sflphone-common/src/managerimpl.cpp b/sflphone-common/src/managerimpl.cpp index d46ff12a3e..074090a2c4 100644 --- a/sflphone-common/src/managerimpl.cpp +++ b/sflphone-common/src/managerimpl.cpp @@ -323,7 +323,10 @@ ManagerImpl::answerCall (const CallID& id) // if it was waiting, it's waiting no more if (_dbus) _dbus->getCallManager()->callStateChanged (id, "CURRENT"); - + + std::string codecName = Manager::instance().getCurrentCodecName (id); + if (_dbus) _dbus->getCallManager()->currentSelectedCodec (id,codecName.c_str()); + removeWaitingCall (id); switchCall (id); diff --git a/sflphone-common/src/sipvoiplink.cpp b/sflphone-common/src/sipvoiplink.cpp index 0e4a4cb0b6..5257cabf50 100644 --- a/sflphone-common/src/sipvoiplink.cpp +++ b/sflphone-common/src/sipvoiplink.cpp @@ -2151,7 +2151,7 @@ void call_on_media_update (pjsip_inv_session *inv, pj_status_t status) try { call->setAudioStart (true); - link->getAudioRtp()->start(); + link->getAudioRtp()->start(); } catch(exception& rtpException) { _debug("%s\n", rtpException.what()); } -- GitLab