gobjectification: b34d745f: And now MSN compiles.

qulogic at pidgin.im qulogic at pidgin.im
Wed Jun 9 01:30:51 EDT 2010


-----------------------------------------------------------------
Revision: b34d745fd5f8fb6a7ac67ac3aff3e00452652b23
Ancestor: e0ccd2c4dace88a2dc380f76343b7770b2965f6b
Author: qulogic at pidgin.im
Date: 2010-06-08T08:55:03
Branch: im.pidgin.gobjectification
URL: http://d.pidgin.im/viewmtn/revision/info/b34d745fd5f8fb6a7ac67ac3aff3e00452652b23

Modified files:
        libpurple/protocols/msn/directconn.c
        libpurple/protocols/msn/msn.c

ChangeLog: 

And now MSN compiles.

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/directconn.c	e4c6df66387f55fbc08679c133b888ef6ae6b287
+++ libpurple/protocols/msn/directconn.c	dd9e393bbc4a3a0a01e557387422392233571ae6
@@ -22,6 +22,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
  */
 #include "msn.h"
+#include "sha1cipher.h"
 #include "directconn.h"
 
 #include "slp.h"
@@ -53,11 +54,10 @@ msn_dc_calculate_nonce_hash(MsnDirectCon
 	guchar digest[20];
 
 	if (type == DC_NONCE_SHA1) {
-		PurpleCipher *cipher = purple_ciphers_find_cipher("sha1");
-		PurpleCipherContext *context = purple_cipher_context_new(cipher, NULL);
-		purple_cipher_context_append(context, nonce, sizeof(nonce));
-		purple_cipher_context_digest(context, sizeof(digest), digest, NULL);
-		purple_cipher_context_destroy(context);
+		PurpleCipher *cipher = purple_sha1_cipher_new();
+		purple_cipher_append(cipher, nonce, sizeof(nonce));
+		purple_cipher_digest(cipher, sizeof(digest), digest, NULL);
+		g_object_unref(G_OBJECT(cipher));
 	} else if (type == DC_NONCE_PLAIN) {
 		memcpy(digest, nonce, 16);
 	}
============================================================
--- libpurple/protocols/msn/msn.c	4c37c9327cea8342ab87d6283db38354b9aef780
+++ libpurple/protocols/msn/msn.c	532b2edd73707c34b47a4b12eaae63e3ae39ebf3
@@ -1700,7 +1700,7 @@ msn_add_buddy(PurpleConnection *gc, Purp
 	data->buddy = buddy;
 	data->group = group;
 
-	session = purple_connection_get_protocol_data(gc);
+	session = purple_object_get_protocol_data(PURPLE_OBJECT(gc));
 	user = msn_userlist_find_user(session->userlist, bname);
 	if (user && user->authorized) {
 		finish_auth_request(data, NULL);


More information about the Commits mailing list