Skip to content
Snippets Groups Projects
Commit c54eb29c authored by Alexandre Savard's avatar Alexandre Savard
Browse files

#10736: remove conference id from call structure in gnome clien

parent 5a647059
No related branches found
No related tags found
No related merge requests found
...@@ -186,11 +186,6 @@ sflphone_hung_up(callable_obj_t * c) ...@@ -186,11 +186,6 @@ sflphone_hung_up(callable_obj_t * c)
call_remove_all_errors(c); call_remove_all_errors(c);
update_actions(); update_actions();
if (c->_confID) {
g_free(c->_confID);
c->_confID = NULL;
}
// test whether the widget contains text, if not remove it // test whether the widget contains text, if not remove it
if ((im_window_get_nb_tabs() > 1) && c->_im_widget && !(IM_WIDGET(c->_im_widget)->containText)) if ((im_window_get_nb_tabs() > 1) && c->_im_widget && !(IM_WIDGET(c->_im_widget)->containText))
im_window_remove_tab(c->_im_widget); im_window_remove_tab(c->_im_widget);
...@@ -616,8 +611,12 @@ sflphone_new_call() ...@@ -616,8 +611,12 @@ sflphone_new_call()
callable_obj_t *current_selected_call = calltab_get_selected_call(current_calls_tab); callable_obj_t *current_selected_call = calltab_get_selected_call(current_calls_tab);
if ((current_selected_call != NULL) && (current_selected_call->_confID == NULL)) if (current_selected_call != NULL) {
gchar *confID = dbus_get_conference_id(current_selected_call->_callID);
if(g_strcmp0(confID, "") != 0) {
sflphone_on_hold(); sflphone_on_hold();
}
}
// Play a tone when creating a new call // Play a tone when creating a new call
if (calllist_get_size(current_calls_tab) == 0) if (calllist_get_size(current_calls_tab) == 0)
...@@ -816,11 +815,6 @@ sflphone_detach_participant(const gchar* callID) ...@@ -816,11 +815,6 @@ sflphone_detach_participant(const gchar* callID)
DEBUG("Detach participant %s", selectedCall->_callID); DEBUG("Detach participant %s", selectedCall->_callID);
if (selectedCall->_confID) {
g_free(selectedCall->_confID);
selectedCall->_confID = NULL;
}
im_widget_update_state(IM_WIDGET(selectedCall->_im_widget), TRUE); im_widget_update_state(IM_WIDGET(selectedCall->_im_widget), TRUE);
calltree_remove_call(current_calls_tab, selectedCall->_callID); calltree_remove_call(current_calls_tab, selectedCall->_callID);
calltree_add_call(current_calls_tab, selectedCall, NULL); calltree_add_call(current_calls_tab, selectedCall, NULL);
...@@ -949,20 +943,23 @@ void sflphone_fill_codec_list_per_account(account_t *account) ...@@ -949,20 +943,23 @@ void sflphone_fill_codec_list_per_account(account_t *account)
void sflphone_fill_call_list(void) void sflphone_fill_call_list(void)
{ {
gchar **list = dbus_get_call_list(); gchar **call_list = dbus_get_call_list();
for (gchar **calls = list; calls && *calls; ++calls) { for (gchar **callp = call_list; callp && *callp; ++callp) {
gchar *callID = *calls; gchar *callID = *callp;
if (!calllist_get_call(current_calls_tab, callID)) { if (!calllist_get_call(current_calls_tab, callID)) {
callable_obj_t *c = create_new_call_from_details(*calls, dbus_get_call_details(*calls)); callable_obj_t *call = create_new_call_from_details(*callp, dbus_get_call_details(*callp));
c->_zrtp_confirmed = FALSE; call->_zrtp_confirmed = FALSE;
calllist_add_call(current_calls_tab, c); calllist_add_call(current_calls_tab, call);
if (!c->_confID || strlen(c->_confID) == 0)
calltree_add_call(current_calls_tab, c, NULL); // add in treeview only if does not participate to a conference
gchar *confID = dbus_get_conference_id(call->_callID);
if(g_strcmp0(confID, "") == 0)
calltree_add_call(current_calls_tab, call, NULL);
} }
} }
g_strfreev(list); g_strfreev(call_list);
} }
......
...@@ -146,7 +146,6 @@ callable_obj_t *create_new_call_from_details(const gchar *call_id, GHashTable *d ...@@ -146,7 +146,6 @@ callable_obj_t *create_new_call_from_details(const gchar *call_id, GHashTable *d
const gchar * const peer_number = g_hash_table_lookup(details, "PEER_NUMBER"); const gchar * const peer_number = g_hash_table_lookup(details, "PEER_NUMBER");
const gchar * const display_name = g_hash_table_lookup(details, "DISPLAY_NAME"); const gchar * const display_name = g_hash_table_lookup(details, "DISPLAY_NAME");
const gchar * const state_str = g_hash_table_lookup(details, "CALL_STATE"); const gchar * const state_str = g_hash_table_lookup(details, "CALL_STATE");
const gchar * const conf_id = g_hash_table_lookup(details, "CONF_ID");
if (utf8_case_equal(state_str, "CURRENT")) if (utf8_case_equal(state_str, "CURRENT"))
state = CALL_STATE_CURRENT; state = CALL_STATE_CURRENT;
...@@ -163,7 +162,6 @@ callable_obj_t *create_new_call_from_details(const gchar *call_id, GHashTable *d ...@@ -163,7 +162,6 @@ callable_obj_t *create_new_call_from_details(const gchar *call_id, GHashTable *d
gchar *number = call_get_peer_number(peer_number); gchar *number = call_get_peer_number(peer_number);
callable_obj_t *c = create_new_call(CALL, state, call_id, accountID, display_name, number); callable_obj_t *c = create_new_call(CALL, state, call_id, accountID, display_name, number);
c->_confID = g_strdup(conf_id);
g_free(number); g_free(number);
return c; return c;
} }
...@@ -199,8 +197,7 @@ callable_obj_t *create_history_entry_from_hashtable(GHashTable *entry) ...@@ -199,8 +197,7 @@ callable_obj_t *create_history_entry_from_hashtable(GHashTable *entry)
value = g_hash_table_lookup(entry, TIMESTAMP_STOP_KEY); value = g_hash_table_lookup(entry, TIMESTAMP_STOP_KEY);
new_call->_time_stop = value ? atoi(value) : 0; new_call->_time_stop = value ? atoi(value) : 0;
new_call->_recordfile = g_strdup(g_hash_table_lookup(entry, RECORDING_PATH_KEY)); new_call->_recordfile = g_strdup(g_hash_table_lookup(entry, RECORDING_PATH_KEY));
new_call->_confID = g_strdup(g_hash_table_lookup(entry, CONFID_KEY)); new_call->_historyConfID = g_strdup(g_hash_table_lookup(entry, CONFID_KEY));
new_call->_historyConfID = g_strdup(new_call->_confID);
new_call->_record_is_playing = FALSE; new_call->_record_is_playing = FALSE;
return new_call; return new_call;
...@@ -209,7 +206,6 @@ callable_obj_t *create_history_entry_from_hashtable(GHashTable *entry) ...@@ -209,7 +206,6 @@ callable_obj_t *create_history_entry_from_hashtable(GHashTable *entry)
void free_callable_obj_t (callable_obj_t *c) void free_callable_obj_t (callable_obj_t *c)
{ {
g_free(c->_callID); g_free(c->_callID);
g_free(c->_confID);
g_free(c->_historyConfID); g_free(c->_historyConfID);
g_free(c->_accountID); g_free(c->_accountID);
g_free(c->_srtp_cipher); g_free(c->_srtp_cipher);
......
...@@ -96,7 +96,7 @@ typedef struct { ...@@ -96,7 +96,7 @@ typedef struct {
int _state_code; // The numeric state code as defined in SIP or IAX int _state_code; // The numeric state code as defined in SIP or IAX
gchar* _state_code_description; // A textual description of _state_code gchar* _state_code_description; // A textual description of _state_code
gchar* _callID; // The call ID gchar* _callID; // The call ID
gchar* _confID; // The conference ID (NULL if don't participate to a conference) // gchar* _confID; // The conference ID (NULL if don't participate to a conference)
gchar* _historyConfID; // Persistent conf id to be stored in history gchar* _historyConfID; // Persistent conf id to be stored in history
gchar* _accountID; // The account the call is made with gchar* _accountID; // The account the call is made with
time_t _time_start; // The timestamp the call was initiating time_t _time_start; // The timestamp the call was initiating
......
...@@ -143,16 +143,6 @@ void conference_participant_list_update(gchar** participants, conference_obj_t* ...@@ -143,16 +143,6 @@ void conference_participant_list_update(gchar** participants, conference_obj_t*
return; return;
} }
for (gchar **part = participants; part && *part; ++part) {
const gchar *call_id = (const gchar *) (*part);
callable_obj_t *call = calllist_get_call(current_calls_tab, call_id);
if (call) {
g_free(call->_confID);
call->_confID = NULL;
}
}
if (conf->participant_list) { if (conf->participant_list) {
g_slist_free(conf->participant_list); g_slist_free(conf->participant_list);
conf->participant_list = NULL; conf->participant_list = NULL;
...@@ -165,7 +155,6 @@ void conference_participant_list_update(gchar** participants, conference_obj_t* ...@@ -165,7 +155,6 @@ void conference_participant_list_update(gchar** participants, conference_obj_t*
restore_call(call_id); restore_call(call_id);
call = calllist_get_call(current_calls_tab, call_id); call = calllist_get_call(current_calls_tab, call_id);
} }
call->_confID = g_strdup(conf->_confID);
conference_add_participant(call_id, conf); conference_add_participant(call_id, conf);
} }
} }
......
...@@ -338,7 +338,6 @@ conference_created_cb(DBusGProxy *proxy UNUSED, const gchar *confID, void *foo U ...@@ -338,7 +338,6 @@ conference_created_cb(DBusGProxy *proxy UNUSED, const gchar *confID, void *foo U
if (call->_state == CALL_STATE_RECORD) if (call->_state == CALL_STATE_RECORD)
new_conf->_state = CONFERENCE_STATE_ACTIVE_ATTACHED_RECORD; new_conf->_state = CONFERENCE_STATE_ACTIVE_ATTACHED_RECORD;
call->_confID = g_strdup(confID);
call->_historyConfID = g_strdup(confID); call->_historyConfID = g_strdup(confID);
} }
...@@ -365,8 +364,6 @@ conference_removed_cb(DBusGProxy *proxy UNUSED, const gchar *confID, ...@@ -365,8 +364,6 @@ conference_removed_cb(DBusGProxy *proxy UNUSED, const gchar *confID,
callable_obj_t *call = calllist_get_call(current_calls_tab, p->data); callable_obj_t *call = calllist_get_call(current_calls_tab, p->data);
if (call) { if (call) {
g_free(call->_confID);
call->_confID = NULL;
im_widget_update_state(IM_WIDGET(call->_im_widget), TRUE); im_widget_update_state(IM_WIDGET(call->_im_widget), TRUE);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment