/soc/2013/ankitkv/gobjectification: cd01a433f676: Merge default ...

Ankit Vani a at nevitus.org
Sat Jan 25 16:07:19 EST 2014


Changeset: cd01a433f67601088c4e2bec0646b14b0acd1c82
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2014-01-26 02:36 +0530
Branch:	 soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/cd01a433f676

Description:

Merge default branch

diffstat:

 libpurple/protocols/jabber/caps.c   |  8 +-------
 libpurple/protocols/jabber/jabber.c |  4 ++--
 libpurple/protocols/jabber/jutil.c  |  2 +-
 libpurple/tests/check_libpurple.c   |  1 +
 libpurple/tests/test_oscar_util.c   |  2 +-
 5 files changed, 6 insertions(+), 11 deletions(-)

diffs (106 lines):

diff --git a/libpurple/protocols/jabber/caps.c b/libpurple/protocols/jabber/caps.c
--- a/libpurple/protocols/jabber/caps.c
+++ b/libpurple/protocols/jabber/caps.c
@@ -469,6 +469,7 @@ jabber_caps_client_iqcb(JabberStream *js
 			hasher = purple_md5_hash_new();
 		}
 		hash = jabber_caps_calculate_hash(info, hasher);
+		g_object_unref(hasher);
 
 		if (!hash || !g_str_equal(hash, userdata->ver)) {
 			purple_debug_warning("jabber", "Could not validate caps info from "
@@ -484,7 +485,6 @@ jabber_caps_client_iqcb(JabberStream *js
 		}
 
 		g_free(hash);
-		g_object_unref(hasher);
 	}
 
 	if (!userdata->hash && userdata->node_exts) {
@@ -814,7 +814,6 @@ static void
 append_escaped_string(PurpleHash *hash, const gchar *str)
 {
 	g_return_if_fail(hash != NULL);
-	g_object_ref(hash);
 
 	if (str && *str) {
 		char *tmp = g_markup_escape_text(str, -1);
@@ -823,7 +822,6 @@ append_escaped_string(PurpleHash *hash, 
 	}
 
 	purple_hash_append(hash, (const guchar *)"<", 1);
-	g_object_unref(hash);
 }
 
 gchar *jabber_caps_calculate_hash(JabberCapsClientInfo *info, PurpleHash *hash)
@@ -836,8 +834,6 @@ gchar *jabber_caps_calculate_hash(Jabber
 	if (!info || !hash)
 		return NULL;
 
-	g_object_ref(hash);
-
 	/* sort identities, features and x-data forms */
 	info->identities = g_list_sort(info->identities, jabber_identity_compare);
 	info->features = g_list_sort(info->features, (GCompareFunc)strcmp);
@@ -913,8 +909,6 @@ gchar *jabber_caps_calculate_hash(Jabber
 	success = purple_hash_digest(hash, checksum, checksum_size);
 	checksum_size = purple_hash_get_digest_size(hash);
 
-	g_object_unref(hash);
-
 	return (success ? purple_base64_encode(checksum, checksum_size) : NULL);
 }
 
diff --git a/libpurple/protocols/jabber/jabber.c b/libpurple/protocols/jabber/jabber.c
--- a/libpurple/protocols/jabber/jabber.c
+++ b/libpurple/protocols/jabber/jabber.c
@@ -4078,12 +4078,12 @@ static void jabber_init_protocol(PurpleP
 	purple_signal_register(protocol, "jabber-receiving-xmlnode",
 			purple_marshal_VOID__POINTER_POINTER, G_TYPE_NONE, 2,
 			PURPLE_TYPE_CONNECTION,
-			G_TYPE_POINTER); /* modifiable PurpleXmlNode */
+			G_TYPE_POINTER); /* pointer to a PurpleXmlNode* */
 
 	purple_signal_register(protocol, "jabber-sending-xmlnode",
 			purple_marshal_VOID__POINTER_POINTER, G_TYPE_NONE, 2,
 			PURPLE_TYPE_CONNECTION,
-			G_TYPE_POINTER); /* modifiable PurpleXmlNode */
+			G_TYPE_POINTER); /* pointer to a PurpleXmlNode* */
 
 	/*
 	 * Do not remove this or the plugin will fail. Completely. You have been
diff --git a/libpurple/protocols/jabber/jutil.c b/libpurple/protocols/jabber/jutil.c
--- a/libpurple/protocols/jabber/jutil.c
+++ b/libpurple/protocols/jabber/jutil.c
@@ -751,7 +751,7 @@ jabber_calculate_data_hash(gconstpointer
 
 	if (hash == NULL)
 	{
-		purple_debug_error("jabber", "Could not find %s cipher\n", hash_algo);
+		purple_debug_error("jabber", "Unexpected hashing algorithm %s requested\n", hash_algo);
 		g_return_val_if_reached(NULL);
 	}
 
diff --git a/libpurple/tests/check_libpurple.c b/libpurple/tests/check_libpurple.c
--- a/libpurple/tests/check_libpurple.c
+++ b/libpurple/tests/check_libpurple.c
@@ -28,6 +28,7 @@ static PurpleEventLoopUiOps eventloop_ui
 	g_timeout_add_seconds,
 	NULL,
 	NULL,
+	NULL,
 	NULL
 };
 
diff --git a/libpurple/tests/test_oscar_util.c b/libpurple/tests/test_oscar_util.c
--- a/libpurple/tests/test_oscar_util.c
+++ b/libpurple/tests/test_oscar_util.c
@@ -5,7 +5,7 @@
 
 START_TEST(test_oscar_util_name_compare)
 {
-	int i;
+	size_t i;
 	const char *good[] = {
 		"test",
 		"TEST",



More information about the Commits mailing list