diff --git a/sflphone-client-gnome/src/actions.c b/sflphone-client-gnome/src/actions.c index d0ea932cdf1878c146b6ed888aaed809d20fa4f1..0de9195d7ce9c88ef2a287f3b6fbe8985c0a930b 100644 --- a/sflphone-client-gnome/src/actions.c +++ b/sflphone-client-gnome/src/actions.c @@ -471,14 +471,14 @@ sflphone_pick_up() dbus_accept (selectedCall); stop_notification(); break; - casecalllist_remove_call(current_calls, selectedCall); CALL_STATE_HOLD: + case CALL_STATE_HOLD: sflphone_new_call(); break; case CALL_STATE_TRANSFERT: dbus_transfert (selectedCall); set_timestamp (&selectedCall->_time_stop); calltree_remove_call(current_calls, selectedCall, NULL); - calllist_remove_call(current_calls, selectedCall); + calllist_remove_call(current_calls, selectedCall->_callID); break; case CALL_STATE_CURRENT: case CALL_STATE_RECORD: @@ -1282,7 +1282,7 @@ void sflphone_fill_history (void) gboolean is_first; - DEBUG ("SFLphone: Loading history ..."); + DEBUG ("======================================================== SFLphone: Loading history"); entries = dbus_get_history (); @@ -1328,10 +1328,11 @@ void sflphone_fill_history (void) // first ptr refers to entry type if(g_strcmp0(*ptr, "2188") == 0) { + DEBUG("------------------------------- SFLphone: Serialized item: %s", *ptr); create_conference_history_entry_from_serialized((gchar *)key, (gchar **)ptr, &conference_entry); conferencelist_add (history, conference_entry); - calltree_add_conference (history, conference_entry); conferencelist_add(current_calls, conference_entry); + calltree_add_conference (history, conference_entry); g_hash_table_remove(entries, key_to_min); } else { @@ -1348,6 +1349,8 @@ void sflphone_fill_history (void) } } } + + DEBUG ("======================================================== SFLphone: Loading history ...(end)"); } void sflphone_save_history (void) @@ -1359,7 +1362,7 @@ void sflphone_save_history (void) GHashTable *result = NULL; gchar *key, *value; - DEBUG ("SFLphone: Saving history"); + DEBUG ("==================================================== SFLphone: Saving history"); result = g_hash_table_new (NULL, g_str_equal); size = calllist_get_size (history); @@ -1369,14 +1372,14 @@ void sflphone_save_history (void) if (current) { if(current->type == HIST_CALL) { - DEBUG("Serialize call"); value = serialize_history_call_entry (current->elem.call); key = convert_timestamp_to_gchar (current->elem.call->_time_start); + DEBUG("--------------------------------- SFLphone: Serialize call [%s]: %s", key, value); } else if(current->type == HIST_CONFERENCE) { - DEBUG("Serialize conference"); value = serialize_history_conference_entry(current->elem.conf); key = convert_timestamp_to_gchar (current->elem.conf->_time_start); + DEBUG("--------------------------------- SFLphone: Serialize conference [%s]: %s", key, value); } else { ERROR("SFLphone: Error: Unknown type for serialization"); @@ -1390,16 +1393,16 @@ void sflphone_save_history (void) } size = conferencelist_get_size(history); - DEBUG("Conference list size %d", size); + DEBUG("SFLphone: Conference list size %d", size); while(size > 0) { conf = conferencelist_pop_head(history); size = conferencelist_get_size(history); if(conf) { - DEBUG("Serialize conference"); value = serialize_history_conference_entry(conf); key = convert_timestamp_to_gchar(conf->_time_start); + DEBUG("-------------------------------------- SFLphone: Serialize conference [%s]: %s", key, value); } else { WARN("SFLphone: Warning: %dth element is NULL", i); @@ -1411,6 +1414,9 @@ void sflphone_save_history (void) // Decrement the reference count g_hash_table_unref (result); + + + DEBUG ("==================================================== SFLphone: Saving history (end)"); } void diff --git a/sflphone-client-gnome/src/conference_obj.c b/sflphone-client-gnome/src/conference_obj.c index cf80cc373879330694f3da792d350c68b223d02f..94ba6db828f9793228df480e5dd011d9983f54bd 100644 --- a/sflphone-client-gnome/src/conference_obj.c +++ b/sflphone-client-gnome/src/conference_obj.c @@ -328,8 +328,9 @@ static void process_conference_participant_from_serialized(gchar *participant, c break; case 1: account = *numberptr; - int len = strlen(account); + // remove the ";" character at the end of the account string if(g_str_has_suffix(account, ";")) { + int len = strlen(account); gchar *tmpchar = g_strdup(account); g_strlcpy(account, tmpchar, len); } @@ -343,13 +344,13 @@ static void process_conference_participant_from_serialized(gchar *participant, c tok++; - gchar *name = "name"; + gchar *name = ""; gchar *call_id = generate_call_id(); // we should create call here and add it to the conference to be inserted in history create_new_call(HISTORY_ENTRY, CALL_STATE_DIALING, call_id, account, name, phone_number, &tmp_call); calllist_add_history_call(tmp_call); - calllist_add_call(current_calls, tmp_call); + calllist_add_call(current_calls, tmp_call); conference_add_participant(call_id, conf); diff --git a/sflphone-client-gnome/src/contacts/calltree.c b/sflphone-client-gnome/src/contacts/calltree.c index b29f83016bcee3b8ceddc468eeaf89fdacf32e50..cd46bc6d73aa519de01a62b2b794392e1b16e636 100644 --- a/sflphone-client-gnome/src/contacts/calltree.c +++ b/sflphone-client-gnome/src/contacts/calltree.c @@ -1115,7 +1115,6 @@ void calltree_add_history_entry (callable_obj_t *c, GtkTreeIter *parent) } } else { - DEBUG("?????????????????????????????????????????????????????????????????????\n"); // participant to a conference pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/current.svg", NULL); } @@ -1458,10 +1457,13 @@ void calltree_add_history_conference(conference_obj_t *conf) if(conference_participant) { while(conference_participant) { call_id = (gchar *)(conference_participant->data); - call = calllist_get_call(current_calls, call_id); + call = calllist_get_call(history, call_id); if(call) { calltree_add_history_entry(call, &iter); } + else { + ERROR("ConferenceList: Error: Could not find call %s", call_id); + } conference_participant = conference_next_participant(conference_participant); } } diff --git a/sflphone-client-gnome/src/dbus/dbus.c b/sflphone-client-gnome/src/dbus/dbus.c index d929e1fd50ff0dc9d98a725cd20564d914757909..0bc5829cb84f6af7dcb411ed45b5a72b54d8926a 100644 --- a/sflphone-client-gnome/src/dbus/dbus.c +++ b/sflphone-client-gnome/src/dbus/dbus.c @@ -553,7 +553,7 @@ sip_call_state_cb (DBusGProxy *proxy UNUSED, const gchar* callID, c = calllist_get_call (current_calls, callID); if (c == NULL) { - ERROR("DBUS: Error call is NULL in state changed"); + ERROR("DBUS: Error call is NULL in state changed (call may not have been created yet)"); return; } diff --git a/sflphone-common/src/sip/sipvoiplink.cpp b/sflphone-common/src/sip/sipvoiplink.cpp index fd734a73561c9366582dc4e8d26fc55ebd276a0c..7f4e8663c637984cd9acaddffee0094c3f250883 100644 --- a/sflphone-common/src/sip/sipvoiplink.cpp +++ b/sflphone-common/src/sip/sipvoiplink.cpp @@ -3251,7 +3251,6 @@ void invite_session_state_changed_cb (pjsip_inv_session *inv, pjsip_event *e) } const pj_str_t * description = pjsip_get_status_text (statusCode); - if (statusCode) { // test wether or not dbus manager is instantiated, if not no need to notify the client if (Manager::instance().getDbusManager())