soc.2009.telepathy: 247e755e: Don't pass NULL string values to Request...

sttwister at soc.pidgin.im sttwister at soc.pidgin.im
Fri May 15 05:35:30 EDT 2009


-----------------------------------------------------------------
Revision: 247e755ebb3e4c5b65c453ad220f46f02221fdfa
Ancestor: bec2d2e12d0b76ad31dfdf373e28d934caf89c97
Author: sttwister at soc.pidgin.im
Date: 2009-05-14T22:46:26
Branch: im.pidgin.soc.2009.telepathy
URL: http://d.pidgin.im/viewmtn/revision/info/247e755ebb3e4c5b65c453ad220f46f02221fdfa

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

ChangeLog: 

Don't pass NULL string values to RequestConnection

-------------- next part --------------
============================================================
--- libpurple/protocols/telepathy/telepathy.c	b282263e4146490078efc8ec6990be0cf4a33f0d
+++ libpurple/protocols/telepathy/telepathy.c	962a851af2ce298a908dd22bfa2249eaefc79ee3
@@ -173,7 +173,9 @@ new_channel_cb (TpConnection *proxy,
                 gpointer user_data,
                 GObject *weak_object)
 {
-	purple_debug_info("telepathy", "NewChannel: %s - %s\n", arg_Object_Path, arg_Channel_Type);
+	purple_debug_info("telepathy", "NewChannel:\n");
+	purple_debug_info("telepathy", "  %s\n", arg_Object_Path);
+	purple_debug_info("telepathy", "  %s\n", arg_Channel_Type);
 }
 
 static void
@@ -431,19 +433,23 @@ telepathy_login(PurpleAccount *acct)
 		{
 			if (g_strcmp0(signature, "s") == 0)
 			{
-				tp_asv_set_string(options, name, purple_account_get_string(acct, name, ""));
+				if (g_strcmp0(purple_account_get_string(acct, name, ""), ""))
+					tp_asv_set_string(options, name, purple_account_get_string(acct, name, ""));
 			}
 			else if (g_strcmp0(signature, "n") == 0)
 			{
-				tp_asv_set_int32(options, name, purple_account_get_int(acct, name, 0));
+				if (purple_account_get_int(acct, name, 0) != 0)
+					tp_asv_set_int32(options, name, purple_account_get_int(acct, name, 0));
 			}
 			else if (g_strcmp0(signature, "i") == 0)
 			{
-				tp_asv_set_int32(options, name, purple_account_get_int(acct, name, 0));
+				if (purple_account_get_int(acct, name, 0) != 0)
+					tp_asv_set_int32(options, name, purple_account_get_int(acct, name, 0));
 			}
 			else if (g_strcmp0(signature, "q") == 0)
 			{
-				tp_asv_set_uint32(options, name, purple_account_get_int(acct, name, 0));
+				if (purple_account_get_int(acct, name, 0) != 0)
+					tp_asv_set_uint32(options, name, purple_account_get_int(acct, name, 0));
 			}
 			else if (g_strcmp0(signature, "b") == 0)
 			{


More information about the Commits mailing list