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

useful cleanup

parent 8004d090
No related branches found
No related tags found
No related merge requests found
...@@ -530,23 +530,18 @@ process_dialing(call_t * c, guint keyval, gchar * key) ...@@ -530,23 +530,18 @@ process_dialing(call_t * c, guint keyval, gchar * key)
sflphone_new_call() sflphone_new_call()
{ {
call_t *c;
gchar *from, *to;
sflphone_on_hold(); sflphone_on_hold();
// Play a tone when creating a new call // Play a tone when creating a new call
if( call_list_get_size(current_calls) == 0 ) if( call_list_get_size(current_calls) == 0 )
dbus_start_tone( TRUE , ( voice_mails > 0 )? TONE_WITH_MESSAGE : TONE_WITHOUT_MESSAGE) ; dbus_start_tone( TRUE , ( voice_mails > 0 )? TONE_WITH_MESSAGE : TONE_WITHOUT_MESSAGE) ;
call_t * c = g_new0 (call_t, 1); to = g_strdup("");
c->state = CALL_STATE_DIALING; from = g_strconcat("\"\" <>", NULL);
c->from = g_strconcat("\"\" <>", NULL); create_new_call (to, from, CALL_STATE_DIALING, "", &c);
c->callID = g_new0(gchar, 30);
g_sprintf(c->callID, "%d", rand());
c->to = g_strdup("");
c->_start = 0;
c->_stop = 0;
call_list_add(current_calls,c); call_list_add(current_calls,c);
update_call_tree_add(current_calls,c); update_call_tree_add(current_calls,c);
...@@ -687,6 +682,9 @@ sflphone_place_call ( call_t * c ) ...@@ -687,6 +682,9 @@ sflphone_place_call ( call_t * c )
if(c->state == CALL_STATE_DIALING && strcmp(c->to, "") != 0) if(c->state == CALL_STATE_DIALING && strcmp(c->to, "") != 0)
{ {
format_phone_number (&c->to);
if( account_list_get_size() == 0 ) if( account_list_get_size() == 0 )
{ {
notify_no_accounts(); notify_no_accounts();
...@@ -867,3 +865,13 @@ sflphone_fill_codec_list() ...@@ -867,3 +865,13 @@ sflphone_fill_codec_list()
} }
} }
void format_phone_number (gchar **number) {
gchar *_number;
_number = *number;
strip_spaces (&_number);
}
...@@ -87,7 +87,6 @@ static void handler_async_search (GList *hits, gpointer user_data) { ...@@ -87,7 +87,6 @@ static void handler_async_search (GList *hits, gpointer user_data) {
entry = i->data; entry = i->data;
if (entry) if (entry)
{ {
g_print ("%s\n", entry->name);
/* Get the photo */ /* Get the photo */
if (addressbook_display (addressbook_config, ADDRESSBOOK_DISPLAY_CONTACT_PHOTO)) if (addressbook_display (addressbook_config, ADDRESSBOOK_DISPLAY_CONTACT_PHOTO))
photo = entry->photo; photo = entry->photo;
......
...@@ -963,7 +963,7 @@ SIPVoIPLink::SIPStartCall(SIPCall* call, const std::string& subject UNUSED) ...@@ -963,7 +963,7 @@ SIPVoIPLink::SIPStartCall(SIPCall* call, const std::string& subject UNUSED)
pj_strdup2(_pool, &to, strTo.data()); pj_strdup2(_pool, &to, strTo.data());
pj_strdup2(_pool, &contact, account->getContact().data()); pj_strdup2(_pool, &contact, account->getContact().data());
_debug("%s %s %s\n", from.ptr, contact.ptr, to.ptr); //_debug("%s %s %s\n", from.ptr, contact.ptr, to.ptr);
// create the dialog (UAC) // create the dialog (UAC)
status = pjsip_dlg_create_uac(pjsip_ua_instance(), &from, status = pjsip_dlg_create_uac(pjsip_ua_instance(), &from,
&contact, &contact,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment