im.pidgin.pidgin.khc.msnp15: 4d012a1c6c1e3584daddd19ed2e5028537e11e6a

quantum.analyst at gmail.com quantum.analyst at gmail.com
Sat Jan 12 19:05:44 EST 2008


-----------------------------------------------------------------
Revision: 4d012a1c6c1e3584daddd19ed2e5028537e11e6a
Ancestor: 9154311cf8ee130e33e1a93c2c90647ab9373fed
Author: quantum.analyst at gmail.com
Date: 2008-01-12T23:25:18
Branch: im.pidgin.pidgin.khc.msnp15

Modified files:
        libpurple/protocols/msn/nexus.c
        libpurple/protocols/msn/notification.c
        libpurple/protocols/msn/oim.c libpurple/protocols/msn/oim.h

ChangeLog: 

References #4382, fixes getting offline messages in p15

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/nexus.c	73773939489c4e8a606049c3642aca072ca8f4d5
+++ libpurple/protocols/msn/nexus.c	e4cec55946fe49190788bcb41e077225fb9b3ccc
@@ -37,9 +37,9 @@ static char *ticket_domains[][2] = {
 	/* http://msnpiki.msnfanatic.com/index.php/MSNP15:SSO */
 	/* {"Domain", "Policy Ref URI"}, Purpose */
 	{"messengerclear.live.com", NULL},       /* Authentication for messenger. */
-	{"messenger.msn.com", "?id=507"},        /* Messenger website authentication. */
+	{"messenger.msn.com", "?id=507"},        /* Authentication for receiving OIMs. */
 	{"contacts.msn.com", "MBI"},             /* Authentication for the Contact server. */
-	{"messengersecure.live.com", "MBI_SSL"}, /* Used for messenger.live.com */
+	{"messengersecure.live.com", "MBI_SSL"}, /* Authentication for sending OIMs. */
 	{"spaces.live.com", "MBI"},              /* Authentication for the Windows Live Spaces */
 	{"livecontacts.live.com", "MBI"},        /* Live Contacts API, a simplified version of the Contacts SOAP service */
 	{"storage.live.com", "MBI"},             /* Storage REST API */
============================================================
--- libpurple/protocols/msn/notification.c	39c4c50e583f3d564231bbae933e95dfb0a6cac2
+++ libpurple/protocols/msn/notification.c	dac09e33bc7fa05a74e85900c856bc68bb0446b2
@@ -326,7 +326,7 @@ ver_cmd(MsnCmdProc *cmdproc, MsnCommand 
 	msn_cmdproc_send(cmdproc, "CVR",
 //					 "0x0409 winnt 5.1 i386 MSG80BETA 8.0.0689 msmsgs %s",
 //					"0x0804 winnt 5.1 i386 MSNMSGR 8.0.0792 msmsgs %s",
-					"0x0409 winnt 5.1 i386 MSNMSGR 8.5.1288.816 msmsgs %s",
+					"0x0409 winnt 5.1 i386 MSNMSGR 8.5.1288 msmsgs %s",
 					 purple_account_get_username(account));
 }
 
============================================================
--- libpurple/protocols/msn/oim.c	fec2d8c9392060de37544b0e290cad99338369e8
+++ libpurple/protocols/msn/oim.c	d6b1b8a602b209c80241b0fd65589472ef7fb134
@@ -288,12 +288,23 @@ msn_oim_post_delete_msg(MsnOimRecvData *
 	MsnOim *oim = rdata->oim;
 	char *msgid = rdata->msg_id;
 	char *soap_body;
+	GHashTable *token;
+	const char *msn_t;
+	const char *msn_p;
 
 	purple_debug_info("MSNP14","Delete single OIM Message {%s}\n",msgid);
 
-	soap_body = g_strdup_printf(MSN_OIM_DEL_TEMPLATE,
-		oim->session->passport_info.t, oim->session->passport_info.p, msgid);
+	token = msn_nexus_get_token(oim->session->nexus, MSN_AUTH_MESSENGER_WEB);
+	g_return_if_fail(token != NULL);
 
+	msn_t = g_hash_table_lookup(token, "t");
+	msn_p = g_hash_table_lookup(token, "p");
+
+	g_return_if_fail(msn_t != NULL);
+	g_return_if_fail(msn_p != NULL);
+
+	soap_body = g_strdup_printf(MSN_OIM_DEL_TEMPLATE, msn_t, msn_p, msgid);
+
 	msn_soap_message_send(oim->session,
 		msn_soap_message_new(MSN_OIM_DEL_SOAP_ACTION,
 			xmlnode_from_str(soap_body, -1)),
@@ -535,14 +546,24 @@ msn_oim_post_single_get_msg(MsnOim *oim,
 {
 	char *soap_body;
 	MsnOimRecvData *data = g_new0(MsnOimRecvData, 1);
+	GHashTable *token;
+	const char *msn_t;
+	const char *msn_p;
 
 	purple_debug_info("MSNP14","Get single OIM Message\n");
 
+	token = msn_nexus_get_token(oim->session->nexus, MSN_AUTH_MESSENGER_WEB);
+	g_return_if_fail(token != NULL);
+
+	msn_t = g_hash_table_lookup(token, "t");
+	msn_p = g_hash_table_lookup(token, "p");
+	g_return_if_fail(msn_t != NULL);
+	g_return_if_fail(msn_p != NULL);
+
 	data->oim = oim;
 	data->msg_id = msgid;
 
-	soap_body = g_strdup_printf(MSN_OIM_GET_TEMPLATE,
-		oim->session->passport_info.t, oim->session->passport_info.p, msgid);
+	soap_body = g_strdup_printf(MSN_OIM_GET_TEMPLATE, msn_t, msn_p, msgid);
 
 	msn_soap_message_send(oim->session,
 		msn_soap_message_new(MSN_OIM_GET_SOAP_ACTION,
============================================================
--- libpurple/protocols/msn/oim.h	a1b35da8b51101307ea29a1f5e4be96e89c2e4e3
+++ libpurple/protocols/msn/oim.h	b45a4f987a968b19653f351fba2d376f873ce4dd
@@ -31,7 +31,10 @@
 #define MSN_OIM_GET_SOAP_ACTION	"http://www.hotmail.msn.com/ws/2004/09/oim/rsi/GetMessage"
 
 #define MSN_OIM_GET_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
-"<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"\
+"<soap:Envelope"\
+	" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""\
+	" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""\
+	" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"\
 	"<soap:Header>"\
 		"<PassportCookie xmlns=\"http://www.hotmail.msn.com/ws/2004/09/oim/rsi\">"\
 			"<t>%s</t>"\
@@ -50,11 +53,14 @@
 #define MSN_OIM_DEL_SOAP_ACTION	"http://www.hotmail.msn.com/ws/2004/09/oim/rsi/DeleteMessages"
 
 #define MSN_OIM_DEL_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
-"<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"\
+"<soap:Envelope"\
+	" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""\
+	" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""\
+	" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"\
 	"<soap:Header>"\
 		"<PassportCookie xmlns=\"http://www.hotmail.msn.com/ws/2004/09/oim/rsi\">"\
 			"<t>%s</t>"\
-			" <p>%s</p>"\
+			"<p>%s</p>"\
 		"</PassportCookie>"\
 	"</soap:Header>"\
 	"<soap:Body>"\
@@ -79,9 +85,19 @@
 #define MSN_OIM_SEND_URL	"/OimWS/oim.asmx"
 #define MSN_OIM_SEND_SOAP_ACTION	"http://messenger.live.com/ws/2006/09/oim/Store2"
 #define MSN_OIM_SEND_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
-"<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"\
+"<soap:Envelope"\
+	" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""\
+	" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""\
+	" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"\
 	"<soap:Header>"\
-		"<From memberName=\"%s\" friendlyName=\"%s\" xml:lang=\"en-US\" proxy=\"MSNMSGR\" xmlns=\"http://messenger.msn.com/ws/2004/09/oim/\" msnpVer=\"MSNP15\" buildVer=\"8.1.0178\"/>"\
+		"<From"\
+			" memberName=\"%s\""\
+			" friendlyName=\"%s\""\
+			" xml:lang=\"en-US\""\
+			" proxy=\"MSNMSGR\""\
+			" xmlns=\"http://messenger.msn.com/ws/2004/09/oim/\""\
+			" msnpVer=\"MSNP15\""\
+			" buildVer=\"8.5.1288\"/>"\
 		"<To memberName=\"%s\" xmlns=\"http://messenger.msn.com/ws/2004/09/oim/\"/>"\
 		"<Ticket passport=\"%s\" appid=\"%s\" lockkey=\"%s\" xmlns=\"http://messenger.msn.com/ws/2004/09/oim/\"/>"\
 		"<Sequence xmlns=\"http://schemas.xmlsoap.org/ws/2003/03/rm\">"\


More information about the Commits mailing list