diff options
author | Guillaume Desmottes <gdesmott@gnome.org> | 2009-04-13 23:19:06 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2009-04-13 23:19:06 +0800 |
commit | 25f55734a73d8d962ee8a68c559ace7e0cdac971 (patch) | |
tree | c51e60009d52861b5055a98200ae7738e3de603d | |
parent | 9d5e59f9449a05770e2e7d2fde244e4d66bcaf8b (diff) | |
download | gsoc2013-empathy-25f55734a73d8d962ee8a68c559ace7e0cdac971.tar gsoc2013-empathy-25f55734a73d8d962ee8a68c559ace7e0cdac971.tar.gz gsoc2013-empathy-25f55734a73d8d962ee8a68c559ace7e0cdac971.tar.bz2 gsoc2013-empathy-25f55734a73d8d962ee8a68c559ace7e0cdac971.tar.lz gsoc2013-empathy-25f55734a73d8d962ee8a68c559ace7e0cdac971.tar.xz gsoc2013-empathy-25f55734a73d8d962ee8a68c559ace7e0cdac971.tar.zst gsoc2013-empathy-25f55734a73d8d962ee8a68c559ace7e0cdac971.zip |
empathy_tp_tube_new_stream_tube: allow NULL as parameters. Fixes #575817
From: Guillaume Desmottes <gdesmott@gnome.org>
svn path=/trunk/; revision=2828
-rw-r--r-- | libempathy/empathy-tp-tube.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libempathy/empathy-tp-tube.c b/libempathy/empathy-tp-tube.c index 793b6ff7a..bde84fbed 100644 --- a/libempathy/empathy-tp-tube.c +++ b/libempathy/empathy-tp-tube.c @@ -347,6 +347,12 @@ empathy_tp_tube_new_stream_tube (EmpathyContact *contact, dbus_g_type_struct_set (address, 0, hostname, 1, port, G_MAXUINT); control_param = tp_g_value_slice_new (G_TYPE_STRING); + if (parameters == NULL) + /* Pass an empty dict as parameters */ + parameters = g_hash_table_new (g_str_hash, g_str_equal); + else + g_hash_table_ref (parameters); + if (!emp_cli_channel_type_stream_tube_run_offer_stream_tube ( TP_PROXY(channel), -1, type, address, TP_SOCKET_ACCESS_CONTROL_LOCALHOST, control_param, parameters, @@ -369,6 +375,7 @@ OUT: tp_g_value_slice_free (address); tp_g_value_slice_free (control_param); g_object_unref (connection); + g_hash_table_unref (parameters); return tube; } |