gobjectification: 09c9df75: Various compilation fixes. References #6...

sadrul at pidgin.im sadrul at pidgin.im
Sat Jun 28 02:40:45 EDT 2008


-----------------------------------------------------------------
Revision: 09c9df753700d1a38895d5ae3425da0e262395bf
Ancestor: 4ed8c40c3fcb853a6f0918e355d88581e95e07f5
Author: Lee Roach <phroggster at gmail.com>
Date: 2008-06-28T06:39:49
Branch: im.pidgin.gobjectification
URL: http://d.pidgin.im/viewmtn/revision/info/09c9df753700d1a38895d5ae3425da0e262395bf

Modified files:
        libpurple/hmaccipher.c libpurple/protocols/jabber/auth.c
        libpurple/protocols/msnp9/nexus.c
        libpurple/protocols/null/nullprpl.c

ChangeLog: 

Various compilation fixes. References #6200.

-------------- next part --------------
============================================================
--- libpurple/hmaccipher.c	44ad9ef92f1f5abf7187c21d1881cc490986de28
+++ libpurple/hmaccipher.c	37b7608a507ac520e523eeb6fa673b3f71192f6e
@@ -170,7 +170,12 @@ purple_hmac_cipher_set_hash(PurpleCipher
 {
 	PurpleHMACCipher *hmac_cipher = PURPLE_HMAC_CIPHER(cipher);
 
+#if GLIB_CHECK_VERSION(2,10,0)
 	hmac_cipher->priv->hash = g_object_ref_sink(hash);
+#else
+	hmac_cipher->priv->hash = g_object_ref(G_OBJECT(hash));
+#endif
+
 	hmac_cipher->priv->blocksize = purple_cipher_get_block_size(hash);
 
 	g_object_notify(G_OBJECT(hmac_cipher), "hash");
============================================================
--- libpurple/protocols/jabber/auth.c	8c2ce2d0b1445c0809a8a58743faf3a2e01962c7
+++ libpurple/protocols/jabber/auth.c	4ef5e56cdf7a4ff3e4966ebd3f6579a12467395e
@@ -327,8 +327,9 @@ static void jabber_auth_start_cyrus(Jabb
 				 * plaintext auth
 				 */
 				} else if (!plaintext) {
+					PurpleAccount *account = purple_connection_get_account(js->gc);
 					char *msg = g_strdup_printf(_("%s requires plaintext authentication over an unencrypted connection.  Allow this and continue authentication?"),
-							purple_connection_get_account(js->gc)->username);
+								    purple_account_get_username(account));
 					purple_request_yes_no(js->gc, _("Plaintext Authentication"),
 							_("Plaintext Authentication"),
 							msg,
============================================================
--- libpurple/protocols/msnp9/nexus.c	701bdb74e359349b2caf31802986ca24ec7ab8c7
+++ libpurple/protocols/msnp9/nexus.c	89531637fe8aa6c170aad857396da484b5d20865
@@ -325,6 +325,8 @@ login_connect_cb(gpointer data, PurpleSs
 	char *request_str, *head, *tail;
 	char *buffer = NULL;
 	guint32 ctint;
+	PurpleAccount *account;
+	PurpleConnection *pc;
 
 	nexus = data;
 	g_return_if_fail(nexus != NULL);
@@ -334,11 +336,13 @@ login_connect_cb(gpointer data, PurpleSs
 
 	msn_session_set_login_step(session, MSN_LOGIN_STEP_GET_COOKIE);
 
-	username =
-		g_strdup(purple_url_encode(purple_account_get_username(session->account)));
+	account = session->account;
+	pc = purple_account_get_connection(account);
 
-	password = g_utf8_strncpy(g_strdup(purple_connection_get_password(session->account->gc)),
-							  purple_connection_get_password(session->account->gc), 16);
+	username = g_strdup(purple_url_encode(purple_account_get_username(account)));
+
+	password = g_utf8_strncpy(g_strdup(purple_connection_get_password(pc)),
+							  purple_connection_get_password(pc), 16);
 	encpass = g_strdup(purple_url_encode(password));
 	g_free(password);
 
============================================================
--- libpurple/protocols/null/nullprpl.c	ff70ae17109b3c4fdddb3aa940cce27e35f02ffb
+++ libpurple/protocols/null/nullprpl.c	5141dc739fdce1546019ccaad896ec6a828dfc4d
@@ -898,8 +898,10 @@ static void nullprpl_group_buddy(PurpleC
 static void nullprpl_group_buddy(PurpleConnection *gc, const char *who,
                                  const char *old_group,
                                  const char *new_group) {
+  PurpleAccount *account;
+  account = purple_connection_get_account(gc);
   purple_debug_info("nullprpl", "%s has moved %s from group %s to group %s\n",
-                    gc->account->username, who, old_group, new_group);
+                    purple_account_get_username(account), who, old_group, new_group);
 }
 
 static void nullprpl_rename_group(PurpleConnection *gc, const char *old_name,


More information about the Commits mailing list