changeset 29916:94c380160595

Normalize the remote passport before sending a P2P message. If it's not lowercase, then the switchboard will reject it, causing a whole lot of extra network traffic as Pidgin attempts to resend the same (incorrect) message. Fixes #11532.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Wed, 12 May 2010 05:00:06 +0000
parents 5f7279397ff4
children af5a46ecfb24
files libpurple/protocols/msn/slplink.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/slplink.c	Tue May 11 20:55:13 2010 +0000
+++ b/libpurple/protocols/msn/slplink.c	Wed May 12 05:00:06 2010 +0000
@@ -383,6 +383,7 @@
 msn_slplink_release_slpmsg(MsnSlpLink *slplink, MsnSlpMessage *slpmsg)
 {
 	MsnMessage *msg;
+	const char *passport;
 
 	slpmsg->msg = msg = msn_message_new_msnslp();
 
@@ -421,7 +422,8 @@
 
 	msg->msnslp_header.total_size = slpmsg->size;
 
-	msn_message_set_attr(msg, "P2P-Dest", slplink->remote_user);
+	passport = purple_normalize(slplink->session->account, slplink->remote_user);
+	msn_message_set_attr(msg, "P2P-Dest", passport);
 
 	msg->ack_cb = msg_ack;
 	msg->nak_cb = msg_nak;