gobjectification: 88563a36: Some compile fixes and general cleanup

grim at pidgin.im grim at pidgin.im
Sun Jul 19 13:45:24 EDT 2009


-----------------------------------------------------------------
Revision: 88563a3608d5eba4b2ba6e0a9388b21908307518
Ancestor: 8f746aceb52164b6e33136905dff35b1e2d92c6a
Author: grim at pidgin.im
Date: 2009-07-19T17:41:18
Branch: im.pidgin.gobjectification
URL: http://d.pidgin.im/viewmtn/revision/info/88563a3608d5eba4b2ba6e0a9388b21908307518

Modified files:
        libpurple/protocols/bonjour/bonjour_ft.c
        libpurple/protocols/jabber/jabber.c
        libpurple/protocols/msn/contact.c
        libpurple/protocols/msn/msg.c libpurple/protocols/msn/msn.c

ChangeLog: 

Some compile fixes and general cleanup


-------------- next part --------------
============================================================
--- libpurple/protocols/bonjour/bonjour_ft.c	dcc9f75e85c89458f20b43d363dcbf6badea5ef6
+++ libpurple/protocols/bonjour/bonjour_ft.c	78e13894b13065f91e40609c5ef6a45f9f9382aa
@@ -843,6 +843,7 @@ bonjour_bytestreams_connect(PurpleXfer *
 static void
 bonjour_bytestreams_connect(PurpleXfer *xfer, PurpleBuddy *pb)
 {
+	PurpleAccount *account = NULL;
 	PurpleCipher *cipher;
 	XepXfer *xf;
 	char dstaddr[41];
@@ -859,8 +860,10 @@ bonjour_bytestreams_connect(PurpleXfer *
 	if(!xf)
 		return;
 
-	p = g_strdup_printf("%s%s%s", xf->sid, purple_buddy_get_name(pb), purple_account_get_username(purple_buddy_get_account(pb)));
+	account = purple_buddy_get_account(pb);
 
+	p = g_strdup_printf("%s%s%s", xf->sid, purple_buddy_get_name(pb), purple_account_get_username(account));
+
 	cipher = purple_sha1_cipher_new();
 	purple_cipher_append(cipher, (guchar *)p, strlen(p));
 	purple_cipher_digest(cipher, sizeof(hashval), hashval, NULL);
============================================================
--- libpurple/protocols/jabber/jabber.c	2a3f607250f96b9def0289632088aadf4ce8d3d4
+++ libpurple/protocols/jabber/jabber.c	612d400b462e12196cc8fe266d10c19d9bb4a7d6
@@ -917,7 +917,7 @@ jabber_login(PurpleAccount *account)
 	PurpleConnection *gc = purple_account_get_connection(account);
 	JabberStream *js;
 	PurpleStoredImage *image;
-	PurpleConnectionFlags flags;
+	PurpleConnectionFlags flags = 0;
 
 	flags = PURPLE_CONNECTION_FLAGS_HTML |
 		PURPLE_CONNECTION_FLAGS_ALLOW_CUSTOM_SMILEY;
============================================================
--- libpurple/protocols/msn/contact.c	e68b71a8f781359bb63ab66659198059ddd5fffa
+++ libpurple/protocols/msn/contact.c	4b30dee0c1ceabc92a85a2c8d662be77dd33af4c
@@ -1208,9 +1208,12 @@ msn_add_contact_to_group(MsnSession *ses
 	}
 
 	if (user->invite_message) {
+		PurpleAccount *account = session->account;
+		PurpleConnection *pc = purple_account_get_connection(account);
 		char *tmp;
+
 		body = g_markup_escape_text(user->invite_message, -1);
-		tmp = g_markup_escape_text(purple_connection_get_display_name(session->account->gc), -1);
+		tmp = g_markup_escape_text(purple_connection_get_display_name(pc), -1);
 		invite = g_strdup_printf(MSN_CONTACT_INVITE_MESSAGE_XML, body, tmp);
 		g_free(body);
 		g_free(tmp);
============================================================
--- libpurple/protocols/msn/msg.c	6cdb60424e1d368cca634fdec4c393fcd662454c
+++ libpurple/protocols/msn/msg.c	a59975287c77d846cc8a69e2179db13f66de3584
@@ -949,9 +949,11 @@ datacast_inform_user(MsnSwitchBoard *swb
 	g_free(username);
 
 	if (swboard->conv == NULL) {
-		if (swboard->current_users > 1) 
-			swboard->conv = purple_find_chat(account->gc, swboard->chat_id);
-		else {
+		if (swboard->current_users > 1) {
+			PurpleConnection *pc = purple_account_get_connection(account);
+
+			swboard->conv = purple_find_chat(pc, swboard->chat_id);
+		} else {
 			swboard->conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM,
 									who, account);
 			if (swboard->conv == NULL)
============================================================
--- libpurple/protocols/msn/msn.c	be7374898afd235782037895cae707952953734c
+++ libpurple/protocols/msn/msn.c	09d6b123b11906d2c5e61d5d93d66ad6b9e9f2a5
@@ -1449,7 +1449,7 @@ finish_auth_request(MsnAddReqData *data,
 	g_free(data);
 
 	account = purple_connection_get_account(pc);
-	session = purple_object_get_protocol_data(PURPLE_OBJECT(gc));
+	session = purple_object_get_protocol_data(PURPLE_OBJECT(pc));
 	userlist = session->userlist;
 
 	who = msn_normalize(account, purple_buddy_get_name(buddy));


More information about the Commits mailing list