soc.2009.telepathy: dc84965e: Added parameter checks to telepathy_chan...

sttwister at gmail.com sttwister at gmail.com
Thu Oct 15 15:55:37 EDT 2009


-----------------------------------------------------------------
Revision: dc84965ebfb80c76985b61eddcd91ec01c1043bb
Ancestor: 58173bda0a3ad3e5c85b0db9966100468e0a66b5
Author: sttwister at gmail.com
Date: 2009-10-14T17:41:38
Branch: im.pidgin.soc.2009.telepathy
URL: http://d.pidgin.im/viewmtn/revision/info/dc84965ebfb80c76985b61eddcd91ec01c1043bb

Modified files:
        libpurple/protocols/telepathy/telepathy_channel.c

ChangeLog: 

Added parameter checks to telepathy_channel.c

-------------- next part --------------
============================================================
--- libpurple/protocols/telepathy/telepathy_channel.c	c2ccf61c678b00721ce06788698184c231775eda
+++ libpurple/protocols/telepathy/telepathy_channel.c	e70b5e1d3c491928832d39886fa5935de4e837ac
@@ -59,6 +59,8 @@ create_channel_cb (TpChannelDispatcher *
 	TpDBusDaemon *bus_daemon;
 	TpChannelRequest *request;
 
+	g_return_if_fail(user_data != NULL);
+
 	if (error != NULL)
 	{
 		purple_debug_error("telepathy", "CreateChannel error: %s\n", error->message);
@@ -98,6 +100,8 @@ channel_ready_cb (TpChannel *channel,
                   const GError *error,
                   gpointer user_data)
 {
+	g_return_if_fail(user_data != NULL);
+
 	if (error != NULL)
 	{
 		purple_debug_error("telepathy", "Channel ready error: %s\n", error->message);
@@ -135,6 +139,9 @@ handle_new_channel (PrplTpConnection *da
 handle_new_channel (PrplTpConnection *data,
                     const GValueArray *channel_Properties)
 {
+	g_return_if_fail(data != NULL);
+	g_return_if_fail(channel_Properties != NULL);
+
 	char *object_Path = g_value_get_boxed(g_value_array_get_nth((GValueArray *)channel_Properties, 0));
 	GHashTable *map = g_value_get_boxed(g_value_array_get_nth((GValueArray *)channel_Properties, 1));
 
@@ -184,6 +191,8 @@ new_channels_cb (TpConnection *proxy,
 	int i;
 	PrplTpConnection *data = user_data;
 
+	g_return_if_fail(user_data != NULL);
+
 	if (data->listing_channels)
 		return;
 
@@ -202,6 +211,8 @@ get_channels_cb (TpProxy *proxy,
                  gpointer user_data,
                  GObject *weak_object)
 {
+	g_return_if_fail(user_data != NULL);
+
 	if (error != NULL)
 	{
 		purple_debug_error("telepathy", "Get Channels error: %s\n", error->message);


More information about the Commits mailing list