pidgin: a8deb3f7: Update UUM to allow sending to users on ...

qulogic at pidgin.im qulogic at pidgin.im
Fri Feb 3 01:56:26 EST 2012


----------------------------------------------------------------------
Revision: a8deb3f73726f4148e8f36f317a88fedcb051c34
Parent:   2c13bf358104060d6713317e18e03b434862cb38
Author:   qulogic at pidgin.im
Date:     02/03/12 01:48:16
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/a8deb3f73726f4148e8f36f317a88fedcb051c34

Changelog: 

Update UUM to allow sending to users on any network.

Changes against parent 2c13bf358104060d6713317e18e03b434862cb38

  patched  libpurple/protocols/msn/notification.c

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/notification.c	0072a00805b2ddb78cf4065b7451eb86bf94142f
+++ libpurple/protocols/msn/notification.c	0e774168b07c1393eb354a53c53e7cc5da81043b
@@ -359,23 +359,34 @@ void
 
 /*send Message to Yahoo Messenger*/
 void
-msn_notification_send_uum(MsnSession *session,MsnMessage *msg)
+msn_notification_send_uum(MsnSession *session, MsnMessage *msg)
 {
 	MsnCmdProc *cmdproc;
 	MsnTransaction *trans;
 	char *payload;
 	gsize payload_len;
 	int type;
+	MsnUser *user;
+	int network;
 
+	g_return_if_fail(msg != NULL);
+
 	cmdproc = session->notification->cmdproc;
-	g_return_if_fail(msg     != NULL);
+
 	payload = msn_message_gen_payload(msg, &payload_len);
+	type = msg->type;
+	user = msn_userlist_find_user(session->userlist, msg->remote_user);
+	if (user)
+		network = msn_user_get_network(user);
+	else
+		network = MSN_NETWORK_PASSPORT;
+
 	purple_debug_info("msn",
 		"send UUM, payload{%s}, strlen:%" G_GSIZE_FORMAT ", len:%" G_GSIZE_FORMAT "\n",
 		payload, strlen(payload), payload_len);
-	type = msg->type;
-	trans = msn_transaction_new(cmdproc, "UUM", "%s 32 %d %" G_GSIZE_FORMAT,
-		msg->remote_user, type, payload_len);
+
+	trans = msn_transaction_new(cmdproc, "UUM", "%s %d %d %" G_GSIZE_FORMAT,
+		msg->remote_user, network, type, payload_len);
 	msn_transaction_set_payload(trans, payload, strlen(payload));
 	msn_cmdproc_send_trans(cmdproc, trans);
 }


More information about the Commits mailing list