Commit 5926a7c3 authored by Tristan Matthews's avatar Tristan Matthews

* #7178: simplify calltree

Still crashes when creating a conference from history for conferences
created during the current session.
parent 67051db1
This diff is collapsed.
......@@ -289,16 +289,15 @@ gchar* serialize_history_call_entry(callable_obj_t *entry)
// "0|514-276-5468|Savoir-faire Linux|144562458" for instance
gchar *peer_number, *peer_name, *account_id;
static const gchar * const separator = "|";
gchar *time_start, *time_stop ;
gchar *record_file;
gchar *confID , *time_added;
gchar *confID;
// Need the string form for the history state
const gchar *history_state = get_history_id_from_state(entry->_history_state);
// and the timestamps
time_start = g_strdup_printf("%i", (int) entry->_time_start);
time_stop = g_strdup_printf("%i", (int) entry->_time_stop);
time_added = g_strdup_printf("%i", (int) entry->_time_added);
gchar *time_start = g_strdup_printf("%i", (int) entry->_time_start);
gchar *time_stop = g_strdup_printf("%i", (int) entry->_time_stop);
gchar *time_added = g_strdup_printf("%i", (int) entry->_time_added);
peer_number = entry->_peer_number ? entry->_peer_number : "";
peer_name = (entry->_peer_name && *entry->_peer_name) ? entry->_peer_name : "empty";
......@@ -308,7 +307,7 @@ gchar* serialize_history_call_entry(callable_obj_t *entry)
record_file = entry->_recordfile ? entry->_recordfile : "";
gchar *result = g_strconcat(history_state, separator,
entry->_peer_number, separator,
peer_number, separator,
peer_name, separator,
time_start, separator,
time_stop, separator,
......
......@@ -110,7 +110,7 @@ void free_conference_obj_t (conference_obj_t *c)
static
void conference_add_participant_number(const gchar *call_id, conference_obj_t *conf)
{
callable_obj_t *call = calllist_get_call(current_calls, call_id);
callable_obj_t *call = calllist_get_call(current_calls_tab, call_id);
if (!call) {
ERROR("Conference: Error: Could not find %s", call_id);
......@@ -156,7 +156,7 @@ void conference_participant_list_update(gchar** participants, conference_obj_t*
for (gchar **part = participants; part && *part; part++) {
gchar *call_id = (gchar *)(*part);
callable_obj_t *call = calllist_get_call(current_calls, call_id);
callable_obj_t *call = calllist_get_call(current_calls_tab, call_id);
if (call->_confID != NULL) {
g_free(call->_confID);
......@@ -171,7 +171,7 @@ void conference_participant_list_update(gchar** participants, conference_obj_t*
for (gchar **part = participants; part && *part; part++) {
gchar *call_id = (gchar*)(*part);
callable_obj_t *call = calllist_get_call(current_calls, call_id);
callable_obj_t *call = calllist_get_call(current_calls_tab, call_id);
call->_confID = g_strdup(conf->_confID);
conference_add_participant(call_id, conf);
}
......@@ -179,48 +179,44 @@ void conference_participant_list_update(gchar** participants, conference_obj_t*
gchar *serialize_history_conference_entry(conference_obj_t *entry)
{
gchar *result = "";
static const gchar * const separator = "|";
gchar *time_start = "";
gchar *time_stop = "";
gchar *peer_name = "";
gchar *participantstr = "";
gchar *confID = "";
GSList *participant_list;
gint length = 0;
gint i;
confID = entry->_confID;
gchar *confID = entry->_confID;
time_start = g_strdup_printf("%i", (int) entry->_time_start);
time_stop = g_strdup_printf("%i", (int) entry->_time_stop);
gchar *time_start = g_strdup_printf("%i", (int) entry->_time_start);
gchar *time_stop = g_strdup_printf("%i", (int) entry->_time_stop);
peer_name = (entry->_confID == NULL || (strlen(entry->_confID) == 0)) ? "empty": entry->_confID;
gchar *peer_name = (entry->_confID == NULL || (strlen(entry->_confID) == 0)) ? "empty": entry->_confID;
length = g_slist_length(entry->participant_list);
participant_list = entry->participant_list;
gint length = g_slist_length(entry->participant_list);
GSList *participant_list = entry->participant_list;
for (i = 0; i < length; i++) {
gchar *participantstr = NULL;
for (gint i = 0; i < length; ++i) {
const gchar * const tmp = g_slist_nth_data(participant_list, i);
if (!tmp)
WARN("Conference: Peer number is NULL in conference list");
participantstr = g_strconcat(participantstr, tmp, ";", NULL);
gchar *old = participantstr;
participantstr = g_strconcat(old, tmp, ";", NULL);
g_free(old);
DEBUG("Conference: Participant number: %s, concatenation: %s", tmp, participantstr);
}
result = g_strconcat("9999", separator,
participantstr, separator, // peer number
peer_name, separator,
time_start, separator,
time_stop, separator,
confID, separator,
"empty", separator, // peer AccountID
entry->_recordfile ? entry->_recordfile : "", separator,
"empty", separator,
"empty", NULL);
static const gchar * const separator = "|";
gchar *result = g_strconcat("9999", separator,
participantstr, separator, // peer number
peer_name, separator,
time_start, separator,
time_stop, separator,
confID, separator,
"empty", separator, // peer AccountID
entry->_recordfile ? entry->_recordfile : "", separator,
"empty", separator,
"empty", NULL);
g_free(participantstr);
g_free(time_stop);
g_free(time_start);
return result;
}
......
......@@ -63,7 +63,6 @@ typedef struct {
GtkWidget *_im_widget; // associated instant messaging widget
time_t _time_start;
time_t _time_stop;
time_t _time_current;
gchar *_recordfile;
gboolean _record_is_playing;
} conference_obj_t;
......
......@@ -48,8 +48,8 @@ handler_async_search(GList *hits, gpointer user_data)
{
AddressBook_Config *addressbook_config = user_data;
gtk_tree_store_clear(contacts->store);
calllist_reset(contacts);
gtk_tree_store_clear(contacts_tab->store);
calllist_reset(contacts_tab);
for (GList *i = hits; i != NULL; i = i->next) {
GdkPixbuf *photo = NULL;
......@@ -85,7 +85,7 @@ handler_async_search(GList *hits, gpointer user_data)
}
g_list_free(hits);
gtk_widget_grab_focus(GTK_WIDGET(contacts->view));
gtk_widget_grab_focus(GTK_WIDGET(contacts_tab->view));
}
void abook_init()
......
......@@ -79,8 +79,8 @@ void calllist_add_contact(gchar *contact_name, gchar *contact_phone, contact_typ
new_call->_contact_thumbnail = pixbuf;
}
calllist_add_call(contacts, new_call);
calltree_add_call(contacts, new_call, NULL);
calllist_add_call(contacts_tab, new_call);
calltree_add_call(contacts_tab, new_call, NULL);
}
/*
......@@ -119,8 +119,8 @@ void calllist_add_history_call(callable_obj_t *obj)
QueueElement *element = g_new0(QueueElement, 1);
element->type = HIST_CALL;
element->elem.call = obj;
g_queue_push_tail(history->callQueue, (gpointer) element);
calltree_add_call(history, obj, NULL);
g_queue_push_tail(history_tab->callQueue, (gpointer) element);
calltree_add_history_entry(obj, NULL);
}
}
......@@ -130,8 +130,8 @@ void calllist_add_history_conference(conference_obj_t *obj)
QueueElement *element = g_new0(QueueElement, 1);
element->type = HIST_CONFERENCE;
element->elem.conf = obj;
g_queue_push_tail(history->callQueue, (gpointer) element);
calltree_add_conference(history, obj);
g_queue_push_tail(history_tab->callQueue, (gpointer) element);
calltree_add_conference_to_history(obj);
}
}
......@@ -147,25 +147,25 @@ calllist_add_call(calltab_t* tab, callable_obj_t * c)
void
calllist_clean_history(void)
{
guint size = calllist_get_size(history);
guint size = calllist_get_size(history_tab);
for (guint i = 0; i < size; i++) {
QueueElement* c = calllist_get_nth(history, i);
QueueElement* c = calllist_get_nth(history_tab, i);
if (c->type == HIST_CALL)
calltree_remove_call(history, c->elem.call);
calltree_remove_call(history_tab, c->elem.call);
else if (c->type == HIST_CONFERENCE)
calltree_remove_conference(history, c->elem.conf);
calltree_remove_conference(history_tab, c->elem.conf);
}
calllist_reset(history);
calllist_reset(history_tab);
}
void
calllist_remove_from_history(callable_obj_t* c)
{
calllist_remove_call(history, c->_callID);
calltree_remove_call(history, c);
calllist_remove_call(history_tab, c->_callID);
calltree_remove_call(history_tab, c);
}
void
......@@ -185,8 +185,8 @@ calllist_remove_call(calltab_t* tab, const gchar * callID)
g_queue_remove(tab->callQueue, element);
calllist_add_call(history, element->elem.call);
calltree_add_call(history, element->elem.call, NULL);
calllist_add_call(history_tab, element->elem.call);
calltree_add_history_entry(element->elem.call, NULL);
}
......
......@@ -35,10 +35,10 @@
#include "conferencelist.h"
#include <gtk/gtk.h>
calltab_t* active_calltree;
calltab_t* current_calls;
calltab_t* history;
calltab_t* contacts;
calltab_t* active_calltree_tab;
calltab_t* current_calls_tab;
calltab_t* history_tab;
calltab_t* contacts_tab;
calltab_t* calltab_init (gboolean, const gchar * const);
......
This diff is collapsed.
......@@ -72,14 +72,14 @@ void
calltree_add_call (calltab_t *, callable_obj_t *, GtkTreeIter *);
void
calltree_add_call_to_conference(calltab_t *tab, callable_obj_t *call, const gchar * const confID);
calltree_add_call_to_conference_in_history(callable_obj_t *call, const gchar * const confID);
/*
* Update the call tree if the call state changes
* @param c The call to update
*/
void
calltree_update_call (calltab_t *, callable_obj_t *, GtkTreeIter *);
calltree_update_call (calltab_t *, callable_obj_t *);
/**
* Remove a call from the call tree
......@@ -97,7 +97,10 @@ void
calltree_add_history_entry (callable_obj_t *, GtkTreeIter *);
void
calltree_add_conference (calltab_t *, conference_obj_t *);
calltree_add_conference_to_current_calls(conference_obj_t *);
void
calltree_add_conference_to_history(conference_obj_t *);
void
calltree_remove_conference(calltab_t *, const conference_obj_t *);
......
......@@ -63,11 +63,11 @@ void conferencelist_clean(calltab_t *tab)
void conferencelist_clean_history(void)
{
while (conferencelist_get_size(history) > 0) {
conference_obj_t *conf = conferencelist_pop_head(history);
while (conferencelist_get_size(history_tab) > 0) {
conference_obj_t *conf = conferencelist_pop_head(history_tab);
if (conf)
calltree_remove_conference(history, conf);
calltree_remove_conference(history_tab, conf);
else
ERROR("ConferenceList: Conference pointer is NULL");
}
......
......@@ -95,8 +95,8 @@ void history_search(void)
void history_search_init(void)
{
history_filter = history_create_filter(GTK_TREE_MODEL(history->store));
gtk_tree_view_set_model(GTK_TREE_VIEW(history->view), GTK_TREE_MODEL(history_filter));
history_filter = history_create_filter(GTK_TREE_MODEL(history_tab->store));
gtk_tree_view_set_model(GTK_TREE_VIEW(history_tab->view), GTK_TREE_MODEL(history_filter));
}
void history_set_searchbar_widget(GtkWidget *searchbar)
......
......@@ -66,11 +66,7 @@ void searchbar_addressbook_activated(GtkEntry *entry, gchar *arg1 UNUSED, gpoint
void searchbar_entry_changed(GtkEntry* entry UNUSED, gchar* arg1 UNUSED, gpointer data UNUSED)
{
DEBUG("Searchbar: Entry changed");
if (active_calltree == contacts) {
// Search made only when text entry is activated
// addressbook_search (entry);
} else if (active_calltree == history)
if (active_calltree_tab == history_tab)
history_search();
}
......@@ -234,10 +230,10 @@ static void icon_press_cb(GtkEntry *entry, gint position, GdkEventButton *event,
{
DEBUG("Searchbar: Icon pressed");
if (position == GTK_ENTRY_ICON_PRIMARY && active_calltree == history)
if (position == GTK_ENTRY_ICON_PRIMARY && active_calltree_tab == history_tab)
gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL,
event->button, event->time);
else if (position == GTK_ENTRY_ICON_PRIMARY && active_calltree == contacts) {
else if (position == GTK_ENTRY_ICON_PRIMARY && active_calltree_tab == contacts_tab) {
GtkWidget *addrbook_menu = addressbook_menu_new();
gtk_menu_popup(GTK_MENU(addrbook_menu), NULL, NULL, NULL, NULL,
event->button, event->time);
......@@ -259,7 +255,7 @@ GtkWidget *addressbook_menu_new(void)
{
// Create the menu
GtkWidget *menu_widget = gtk_menu_new();
gtk_menu_attach_to_widget(GTK_MENU(menu_widget), contacts->searchbar, NULL);
gtk_menu_attach_to_widget(GTK_MENU(menu_widget), contacts_tab->searchbar, NULL);
// Populate menu
GtkWidget *item = gtk_menu_item_new_with_label("Search is");
......
......@@ -60,11 +60,11 @@ new_call_created_cb(DBusGProxy *proxy UNUSED, const gchar *accountID,
{
callable_obj_t *c = create_new_call(CALL, CALL_STATE_RINGING, callID, accountID, to, to);
calllist_add_call(current_calls, c);
calltree_add_call(current_calls, c, NULL);
calllist_add_call(current_calls_tab, c);
calltree_add_call(current_calls_tab, c, NULL);
update_actions();
calltree_display(current_calls);
calltree_display(current_calls_tab);
}
static void
......@@ -92,7 +92,7 @@ zrtp_negotiation_failed_cb(DBusGProxy *proxy UNUSED, const gchar* callID,
const gchar* reason, const gchar* severity, void * foo UNUSED)
{
main_window_zrtp_negotiation_failed(callID, reason, severity);
callable_obj_t *c = calllist_get_call(current_calls, callID);
callable_obj_t *c = calllist_get_call(current_calls_tab, callID);
if (c)
notify_zrtp_negotiation_failed(c);
......@@ -121,13 +121,13 @@ incoming_message_cb(DBusGProxy *proxy UNUSED, const gchar* callID UNUSED, const
GtkWidget **widget;
gchar *id;
callable_obj_t *call = calllist_get_call(current_calls, callID);
callable_obj_t *call = calllist_get_call(current_calls_tab, callID);
if (call) {
widget = &call->_im_widget;
id = call->_callID;
} else {
conference_obj_t *conf = conferencelist_get(current_calls, callID);
conference_obj_t *conf = conferencelist_get(current_calls_tab, callID);
if (!conf) {
ERROR("Message received, but no recipient found");
......@@ -148,16 +148,16 @@ static void
call_state_cb(DBusGProxy *proxy UNUSED, const gchar* callID, const gchar* state,
void * foo UNUSED)
{
callable_obj_t *c = calllist_get_call(current_calls, callID);
callable_obj_t *c = calllist_get_call(current_calls_tab, callID);
if (c) {
if (g_strcmp0(state, "HUNGUP") == 0) {
if (c->_state == CALL_STATE_CURRENT) {
time(&c->_time_stop);
calltree_update_call(history, c, NULL);
calltree_update_call(history_tab, c);
}
calltree_update_call(history, c, NULL);
calltree_update_call(history_tab, c);
status_bar_display_account();
sflphone_hung_up(c);
} else if (g_strcmp0(state, "UNHOLD_CURRENT") == 0) {
......@@ -196,10 +196,10 @@ call_state_cb(DBusGProxy *proxy UNUSED, const gchar* callID, const gchar* state,
new_call->_history_state = (g_strcasecmp(g_hash_table_lookup(call_details, "CALL_TYPE"), "0") == 0)
? INCOMING : OUTGOING;
calllist_add_call(current_calls, new_call);
calltree_add_call(current_calls, new_call, NULL);
calllist_add_call(current_calls_tab, new_call);
calltree_add_call(current_calls_tab, new_call, NULL);
update_actions();
calltree_display(current_calls);
calltree_display(current_calls_tab);
}
}
}
......@@ -207,7 +207,7 @@ call_state_cb(DBusGProxy *proxy UNUSED, const gchar* callID, const gchar* state,
static void toggle_im(conference_obj_t *conf, gboolean activate)
{
for (GSList *part = conf->participant_list; part; part = g_slist_next(part)) {
callable_obj_t *call = calllist_get_call(current_calls, part->data);
callable_obj_t *call = calllist_get_call(current_calls_tab, part->data);
if (call)
im_widget_update_state(IM_WIDGET(call->_im_widget), activate);
......@@ -220,7 +220,7 @@ conference_changed_cb(DBusGProxy *proxy UNUSED, const gchar* confID,
{
DEBUG("DBUS: Conference state changed: %s\n", state);
conference_obj_t* changed_conf = conferencelist_get(current_calls, confID);
conference_obj_t* changed_conf = conferencelist_get(current_calls_tab, confID);
if (changed_conf == NULL) {
ERROR("DBUS: Conference is NULL in conference state changed");
......@@ -228,7 +228,7 @@ conference_changed_cb(DBusGProxy *proxy UNUSED, const gchar* confID,
}
// remove old conference from calltree
calltree_remove_conference(current_calls, changed_conf);
calltree_remove_conference(current_calls_tab, changed_conf);
// update conference state
if (g_strcmp0(state, "ACTIVE_ATTACHED") == 0)
......@@ -255,7 +255,7 @@ conference_changed_cb(DBusGProxy *proxy UNUSED, const gchar* confID,
// deactivate instant messaging window for new participants
toggle_im(changed_conf, FALSE);
calltree_add_conference(current_calls, changed_conf);
calltree_add_conference_to_current_calls(changed_conf);
}
static void
......@@ -272,9 +272,9 @@ conference_created_cb(DBusGProxy *proxy UNUSED, const gchar* confID, void * foo
// Add conference ID in in each calls
for (gchar **part = participants; part && *part; ++part) {
callable_obj_t *call = calllist_get_call(current_calls, *part);
callable_obj_t *call = calllist_get_call(current_calls_tab, *part);
// set when this call have been added to the conference
/* set when this call has been added to the conference */
time(&call->_time_added);
im_widget_update_state(IM_WIDGET(call->_im_widget), FALSE);
......@@ -291,10 +291,10 @@ conference_created_cb(DBusGProxy *proxy UNUSED, const gchar* confID, void * foo
time(&new_conf->_time_start);
conferencelist_add(current_calls, new_conf);
conferencelist_add(history, new_conf);
calltree_add_conference(current_calls, new_conf);
calltree_add_conference(history, new_conf);
conferencelist_add(current_calls_tab, new_conf);
conferencelist_add(history_tab, new_conf);
calltree_add_conference_to_current_calls(new_conf);
calltree_add_conference_to_history(new_conf);
}
static void
......@@ -302,14 +302,14 @@ conference_removed_cb(DBusGProxy *proxy UNUSED, const gchar* confID, void * foo
{
DEBUG("DBUS: Conference removed %s", confID);
conference_obj_t * c = conferencelist_get(current_calls, confID);
calltree_remove_conference(current_calls, c);
conference_obj_t * c = conferencelist_get(current_calls_tab, confID);
calltree_remove_conference(current_calls_tab, c);
im_widget_update_state(IM_WIDGET(c->_im_widget), FALSE);
// remove all participants for this conference
for (GSList *p = c->participant_list; p; p = conference_next_participant(p)) {
callable_obj_t *call = calllist_get_call(current_calls, p->data);
callable_obj_t *call = calllist_get_call(current_calls_tab, p->data);
if (call) {
g_free(call->_confID);
......@@ -318,7 +318,7 @@ conference_removed_cb(DBusGProxy *proxy UNUSED, const gchar* confID, void * foo
}
}
conferencelist_remove(current_calls, c->_confID);
conferencelist_remove(current_calls_tab, c->_confID);
}
static void
......@@ -326,8 +326,8 @@ record_playback_filepath_cb(DBusGProxy *proxy UNUSED, const gchar *id, const gch
{
DEBUG("DBUS: Filepath for %s: %s", id, filepath);
callable_obj_t *call = calllist_get_call(current_calls, id);
conference_obj_t *conf = conferencelist_get(current_calls, id);
callable_obj_t *call = calllist_get_call(current_calls_tab, id);
conference_obj_t *conf = conferencelist_get(current_calls_tab, id);
if (call && conf) {
ERROR("DBUS: Two objects for this callid");
......@@ -350,10 +350,10 @@ record_playback_stopped_cb(DBusGProxy *proxy UNUSED, const gchar *filepath)
{
DEBUG("DBUS: Playback stopped for %s", filepath);
const gint calllist_size = calllist_get_size(history);
const gint calllist_size = calllist_get_size(history_tab);
for (gint i = 0; i < calllist_size; i++) {
QueueElement *element = calllist_get_nth(history, i);
QueueElement *element = calllist_get_nth(history_tab, i);
if (element == NULL) {
ERROR("DBUS: ERROR: Could not find %dth call", i);
......@@ -363,10 +363,10 @@ record_playback_stopped_cb(DBusGProxy *proxy UNUSED, const gchar *filepath)
element->elem.call->_record_is_playing = FALSE;
}
const gint conflist_size = conferencelist_get_size(history);
const gint conflist_size = conferencelist_get_size(history_tab);
for (gint i = 0; i < conflist_size; i++) {
conference_obj_t *conf = conferencelist_get_nth(history, i);
conference_obj_t *conf = conferencelist_get_nth(history_tab, i);
if (conf == NULL) {
ERROR("DBUS: ERROR: Could not find %dth conf", i);
......@@ -407,7 +407,7 @@ static void
secure_sdes_on_cb(DBusGProxy *proxy UNUSED, const gchar *callID, void *foo UNUSED)
{
DEBUG("DBUS: SRTP using SDES is on");
callable_obj_t *c = calllist_get_call(current_calls, callID);
callable_obj_t *c = calllist_get_call(current_calls_tab, callID);
if (c) {
sflphone_srtp_sdes_on(c);
......@@ -420,7 +420,7 @@ static void
secure_sdes_off_cb(DBusGProxy *proxy UNUSED, const gchar *callID, void *foo UNUSED)
{
DEBUG("DBUS: SRTP using SDES is off");
callable_obj_t *c = calllist_get_call(current_calls, callID);
callable_obj_t *c = calllist_get_call(current_calls_tab, callID);
if (c) {
sflphone_srtp_sdes_off(c);
......@@ -433,7 +433,7 @@ secure_zrtp_on_cb(DBusGProxy *proxy UNUSED, const gchar* callID, const gchar* ci
void * foo UNUSED)
{
DEBUG("DBUS: SRTP using ZRTP is ON secure_on_cb");
callable_obj_t *c = calllist_get_call(current_calls, callID);
callable_obj_t *c = calllist_get_call(current_calls_tab, callID);
if (c) {
c->_srtp_cipher = g_strdup(cipher);
......@@ -446,7 +446,7 @@ static void
secure_zrtp_off_cb(DBusGProxy *proxy UNUSED, const gchar* callID, void * foo UNUSED)
{
DEBUG("DBUS: SRTP using ZRTP is OFF");
callable_obj_t *c = calllist_get_call(current_calls, callID);
callable_obj_t *c = calllist_get_call(current_calls_tab, callID);
if (c) {
sflphone_srtp_zrtp_off(c);
......@@ -459,7 +459,7 @@ show_zrtp_sas_cb(DBusGProxy *proxy UNUSED, const gchar* callID, const gchar* sas
const gboolean verified, void * foo UNUSED)
{
DEBUG("DBUS: Showing SAS");
callable_obj_t * c = calllist_get_call(current_calls, callID);
callable_obj_t * c = calllist_get_call(current_calls_tab, callID);
if (c)
sflphone_srtp_zrtp_show_sas(c, sas, verified);
......@@ -469,7 +469,7 @@ static void
confirm_go_clear_cb(DBusGProxy *proxy UNUSED, const gchar* callID, void * foo UNUSED)
{
DEBUG("DBUS: Confirm Go Clear request");
callable_obj_t * c = calllist_get_call(current_calls, callID);
callable_obj_t * c = calllist_get_call(current_calls_tab, callID);
if (c)
main_window_confirm_go_clear(c);
......@@ -479,7 +479,7 @@ static void
zrtp_not_supported_cb(DBusGProxy *proxy UNUSED, const gchar* callID, void * foo UNUSED)
{
DEBUG("ZRTP not supported on the other end");
callable_obj_t * c = calllist_get_call(current_calls, callID);
callable_obj_t * c = calllist_get_call(current_calls_tab, callID);
if (c) {
main_window_zrtp_not_supported(c);
......@@ -492,7 +492,7 @@ sip_call_state_cb(DBusGProxy *proxy UNUSED, const gchar* callID,
const gchar* description, const guint code, void * foo UNUSED)
{
DEBUG("DBUS: Sip call state changed %s", callID);
callable_obj_t *c = calllist_get_call(current_calls, callID);
callable_obj_t *c = calllist_get_call(current_calls_tab, callID);
if (c)
sflphone_call_state_changed(c, description, code);
......