# HG changeset patch # User Elliott Sales de Andrade # Date 1200180318 0 # Node ID b268fc2c912143b13707756078bf088e7884c716 # Parent aa25bb450139a522686f8231e76766a9be7e93a4 References #4382, fixes getting offline messages in p15 committer: Ka-Hing Cheung diff -r aa25bb450139 -r b268fc2c9121 libpurple/protocols/msn/nexus.c --- a/libpurple/protocols/msn/nexus.c Wed Dec 26 02:33:46 2007 +0000 +++ b/libpurple/protocols/msn/nexus.c Sat Jan 12 23:25:18 2008 +0000 @@ -37,9 +37,9 @@ /* 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 */ diff -r aa25bb450139 -r b268fc2c9121 libpurple/protocols/msn/notification.c --- a/libpurple/protocols/msn/notification.c Wed Dec 26 02:33:46 2007 +0000 +++ b/libpurple/protocols/msn/notification.c Sat Jan 12 23:25:18 2008 +0000 @@ -326,7 +326,7 @@ 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)); } diff -r aa25bb450139 -r b268fc2c9121 libpurple/protocols/msn/oim.c --- a/libpurple/protocols/msn/oim.c Wed Dec 26 02:33:46 2007 +0000 +++ b/libpurple/protocols/msn/oim.c Sat Jan 12 23:25:18 2008 +0000 @@ -288,11 +288,22 @@ 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, @@ -535,14 +546,24 @@ { 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, diff -r aa25bb450139 -r b268fc2c9121 libpurple/protocols/msn/oim.h --- a/libpurple/protocols/msn/oim.h Wed Dec 26 02:33:46 2007 +0000 +++ b/libpurple/protocols/msn/oim.h Sat Jan 12 23:25:18 2008 +0000 @@ -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 ""\ -""\ +""\ ""\ ""\ "%s"\ @@ -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 ""\ -""\ +""\ ""\ ""\ "%s"\ - "

%s

"\ + "

%s

"\ "
"\ "
"\ ""\ @@ -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 ""\ -""\ +""\ ""\ - ""\ + ""\ ""\ ""\ ""\