From d73e1b4aaa23c0d48454a820a60bc18f43079ed9 Mon Sep 17 00:00:00 2001 From: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com> Date: Wed, 28 Oct 2009 15:56:18 -0400 Subject: [PATCH] [#2365] Fixes bad cast --- sflphone-client-gnome/src/actions.c | 4 ++-- sflphone-client-gnome/src/actions.h | 2 +- sflphone-client-gnome/src/config/preferencesdialog.c | 3 ++- sflphone-client-gnome/src/contacts/calltree.c | 4 ++-- sflphone-client-gnome/src/mainwindow.c | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/sflphone-client-gnome/src/actions.c b/sflphone-client-gnome/src/actions.c index 7376584018..94ecb68507 100644 --- a/sflphone-client-gnome/src/actions.c +++ b/sflphone-client-gnome/src/actions.c @@ -304,9 +304,9 @@ void sflphone_fill_ip2ip_profile(void) ip2ip_profile = (GHashTable *) dbus_get_ip2_ip_details(); } -GHashTable * sflphone_get_ip2ip_properties(void) +void sflphone_get_ip2ip_properties (GHashTable **properties) { - return ip2ip_profile; + *properties = ip2ip_profile; } void diff --git a/sflphone-client-gnome/src/actions.h b/sflphone-client-gnome/src/actions.h index 083ba44148..37db1185ea 100644 --- a/sflphone-client-gnome/src/actions.h +++ b/sflphone-client-gnome/src/actions.h @@ -159,7 +159,7 @@ void sflphone_fill_ip2ip_profile(void); * @return The internal hash table representing * the settings for the ip2ip profile. */ -GHashTable * sflphone_get_ip2ip_properties(void); +void sflphone_get_ip2ip_properties (GHashTable **properties); /** * Initialize the accounts data structure diff --git a/sflphone-client-gnome/src/config/preferencesdialog.c b/sflphone-client-gnome/src/config/preferencesdialog.c index 34fdb8c0a4..658e004db2 100644 --- a/sflphone-client-gnome/src/config/preferencesdialog.c +++ b/sflphone-client-gnome/src/config/preferencesdialog.c @@ -179,7 +179,8 @@ GtkWidget* create_direct_ip_calls_tab() gchar * curKeyExchange = "0"; gchar * description; - directIpCallsProperties = sflphone_get_ip2ip_properties(); + //directIpCallsProperties = sflphone_get_ip2ip_properties(); + sflphone_get_ip2ip_properties(&directIpCallsProperties); if(directIpCallsProperties != NULL) { DEBUG("got a directIpCallsProperties"); diff --git a/sflphone-client-gnome/src/contacts/calltree.c b/sflphone-client-gnome/src/contacts/calltree.c index e46d8e0771..62fa1fab1d 100644 --- a/sflphone-client-gnome/src/contacts/calltree.c +++ b/sflphone-client-gnome/src/contacts/calltree.c @@ -269,7 +269,7 @@ row_single_click(GtkTreeView *tree_view UNUSED, void * data UNUSED) DEBUG("Display SAS once %s", displaySasOnce); } else { GHashTable * properties = NULL; - properties = sflphone_get_ip2ip_properties(); + sflphone_get_ip2ip_properties (&properties); if(properties != NULL) { displaySasOnce = g_hash_table_lookup(properties, ACCOUNT_DISPLAY_SAS_ONCE); DEBUG("IP2IP displaysasonce %s", displaySasOnce); } } @@ -539,7 +539,7 @@ calltree_update_call (calltab_t* tab, callable_obj_t * c, GtkTreeIter *parent) { display_sas = FALSE; } } else { GHashTable * properties = NULL; - properties = sflphone_get_ip2ip_properties(); + sflphone_get_ip2ip_properties (&properties); if(properties != NULL) { if(g_strcasecmp(g_hash_table_lookup(properties, ACCOUNT_ZRTP_DISPLAY_SAS),"false") == 0) { display_sas = FALSE; } diff --git a/sflphone-client-gnome/src/mainwindow.c b/sflphone-client-gnome/src/mainwindow.c index 2c655ccfbb..c39d26eb20 100644 --- a/sflphone-client-gnome/src/mainwindow.c +++ b/sflphone-client-gnome/src/mainwindow.c @@ -385,7 +385,7 @@ main_window_zrtp_not_supported(callable_obj_t * c) } else { DEBUG("Account is null callID %s", c->_callID); GHashTable * properties = NULL; - properties = sflphone_get_ip2ip_properties(); + sflphone_get_ip2ip_properties (&properties); if(properties != NULL) { warning_enabled = g_hash_table_lookup(properties, ACCOUNT_ZRTP_NOT_SUPP_WARNING); } } -- GitLab