Mercurial > pidgin
diff libpurple/protocols/msn/oim.c @ 23452:b268fc2c9121
References #4382, fixes getting offline messages in p15
committer: Ka-Hing Cheung <khc@hxbc.us>
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sat, 12 Jan 2008 23:25:18 +0000 |
parents | b82a17934604 |
children | bca58b00afab |
line wrap: on
line diff
--- 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,