diff options
author | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2009-02-17 05:24:19 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2009-02-17 05:24:19 +0800 |
commit | 5e9c5f6a64996a77af997c73e61aebf4abf87bf1 (patch) | |
tree | 071b7421cdee130b1a65d814edb0a074b25290a8 | |
parent | 163f1b912f1ad65f4de24cf913a38e5c531fe9c0 (diff) | |
download | gsoc2013-empathy-5e9c5f6a64996a77af997c73e61aebf4abf87bf1.tar gsoc2013-empathy-5e9c5f6a64996a77af997c73e61aebf4abf87bf1.tar.gz gsoc2013-empathy-5e9c5f6a64996a77af997c73e61aebf4abf87bf1.tar.bz2 gsoc2013-empathy-5e9c5f6a64996a77af997c73e61aebf4abf87bf1.tar.lz gsoc2013-empathy-5e9c5f6a64996a77af997c73e61aebf4abf87bf1.tar.xz gsoc2013-empathy-5e9c5f6a64996a77af997c73e61aebf4abf87bf1.tar.zst gsoc2013-empathy-5e9c5f6a64996a77af997c73e61aebf4abf87bf1.zip |
empathy-dispatcher.c: Check arguments of non-static functions.
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
svn path=/trunk/; revision=2474
-rw-r--r-- | libempathy/empathy-dispatcher.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libempathy/empathy-dispatcher.c b/libempathy/empathy-dispatcher.c index 377012447..6b5c3fba5 100644 --- a/libempathy/empathy-dispatcher.c +++ b/libempathy/empathy-dispatcher.c @@ -1162,6 +1162,8 @@ empathy_dispatcher_call_with_contact (EmpathyContact *contact, ConnectionData *cd; DispatcherRequestData *request_data; + g_return_if_fail (EMPATHY_IS_CONTACT (contact)); + account = empathy_contact_get_account (contact); connection = g_hash_table_lookup (priv->accounts, account); @@ -1204,6 +1206,8 @@ empathy_dispatcher_chat_with_contact (EmpathyContact *contact, ConnectionData *connection_data; DispatcherRequestData *request_data; + g_return_if_fail (EMPATHY_IS_CONTACT (contact)); + dispatcher = empathy_dispatcher_dup_singleton(); priv = GET_PRIV (dispatcher); @@ -1236,6 +1240,9 @@ empathy_dispatcher_chat_with_contact_id (McAccount *account, EmpathyContactFactory *factory; EmpathyContact *contact; + g_return_if_fail (MC_IS_ACCOUNT (account)); + g_return_if_fail (!EMP_STR_EMPTY (contact_id)); + factory = empathy_contact_factory_dup_singleton (); contact = empathy_contact_factory_get_from_id (factory, account, contact_id); @@ -1292,6 +1299,9 @@ empathy_dispatcher_join_muc (McAccount *account, ConnectionData *connection_data; const gchar *names[] = { roomname, NULL }; + g_return_if_fail (MC_IS_ACCOUNT (account)); + g_return_if_fail (!EMP_STR_EMPTY (roomname)); + dispatcher = empathy_dispatcher_dup_singleton(); priv = GET_PRIV (dispatcher); @@ -1344,6 +1354,10 @@ empathy_dispatcher_create_channel (EmpathyDispatcher *dispatcher, gboolean valid; TpConnection *connection; + g_return_if_fail (EMPATHY_IS_DISPATCHER (dispatcher)); + g_return_if_fail (MC_IS_ACCOUNT (account)); + g_return_if_fail (request != NULL); + connection = g_hash_table_lookup (priv->accounts, account); g_assert (connection != NULL); @@ -1442,6 +1456,10 @@ empathy_dispatcher_send_file_to_contact (EmpathyContact *contact, GHashTable *request = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, (GDestroyNotify) tp_g_value_slice_free); + g_return_if_fail (EMPATHY_IS_CONTACT (contact)); + g_return_if_fail (!EMP_STR_EMPTY (filename)); + g_return_if_fail (!EMP_STR_EMPTY (content_type)); + /* org.freedesktop.Telepathy.Channel.ChannelType */ value = tp_g_value_slice_new (G_TYPE_STRING); g_value_set_string (value, EMP_IFACE_CHANNEL_TYPE_FILE_TRANSFER); |