im.pidgin.pidgin.khc.msnp15: 50c15a1e2ef56e42d914aa983cdb733b1ac4c78b
quantum.analyst at gmail.com
quantum.analyst at gmail.com
Fri Dec 28 02:20:49 EST 2007
-----------------------------------------------------------------
Revision: 50c15a1e2ef56e42d914aa983cdb733b1ac4c78b
Ancestor: b0c629c93a639eddf8a8fcc3e16b33d21217d1f4
Author: quantum.analyst at gmail.com
Date: 2007-12-26T00:34:50
Branch: im.pidgin.pidgin.khc.msnp15
Modified files:
libpurple/protocols/msn/contact.c
libpurple/protocols/msn/contact.h
libpurple/protocols/msn/soap.c
libpurple/protocols/msn/soap2.c
ChangeLog:
Patch 3 from Qulogic, this one updates contact list actions to use ticket
tokens
-------------- next part --------------
============================================================
--- libpurple/protocols/msn/contact.c 2e49ff88c5f1633912487a21cbf0df32a341d617
+++ libpurple/protocols/msn/contact.c 78f229e690763c0baf82970b03f0d386952ca335
@@ -29,6 +29,7 @@
#include "xmlnode.h"
#include "group.h"
#include "soap2.h"
+#include "nexus.h"
const char *MsnSoapPartnerScenarioText[] =
{
@@ -206,6 +207,26 @@ msn_get_user_type(char *type)
return MSN_USER_TYPE_UNKNOWN;
}
+/* Get a ticket token that's correctly formatted */
+static const char *
+msn_contact_get_token(MsnContact *contact)
+{
+ GHashTable *token;
+ char *msn_t;
+ char *msn_p;
+ static char token_str[BUF_LEN];
+
+ token = msn_nexus_get_token(contact->session->nexus, MSN_AUTH_CONTACTS);
+ msn_t = g_hash_table_lookup(token, "t");
+ msn_p = g_hash_table_lookup(token, "p");
+
+ g_sprintf(token_str, "t=%s&p=%s", msn_t, msn_p);
+
+ g_hash_table_unref(token);
+
+ return token_str;
+}
+
/* Create the AddressBook in the server, if we don't have one */
static void
msn_create_address_cb(MsnSoapMessage *req, MsnSoapMessage *resp, gpointer data)
@@ -230,7 +251,9 @@ msn_create_address_book(MsnContact * con
purple_debug_info("msnab","Creating an Address Book.\n");
- body = g_strdup_printf(MSN_ADD_ADDRESSBOOK_TEMPLATE, contact->session->user->passport);
+ body = g_strdup_printf(MSN_ADD_ADDRESSBOOK_TEMPLATE,
+ msn_contact_get_token(contact),
+ contact->session->user->passport);
msn_soap_message_send(contact->session,
msn_soap_message_new(MSN_ADD_ADDRESSBOOK_SOAP_ACTION,
@@ -416,7 +439,9 @@ msn_get_contact_list(MsnContact * contac
update_str = g_strdup_printf(MSN_GET_CONTACT_UPDATE_XML,update_time);
}
- body = g_strdup_printf(MSN_GET_CONTACT_TEMPLATE, partner_scenario_str, update_str ? update_str : "");
+ body = g_strdup_printf(MSN_GET_CONTACT_TEMPLATE, partner_scenario_str,
+ msn_contact_get_token(contact),
+ update_str ? update_str : "");
msn_soap_message_send(contact->session,
msn_soap_message_new(MSN_GET_CONTACT_SOAP_ACTION,
@@ -729,7 +754,10 @@ msn_get_address_book(MsnContact *contact
else if (LastChanged != NULL)
update_str = g_strdup_printf(MSN_GET_ADDRESS_UPDATE_XML, LastChanged);
- body = g_strdup_printf(MSN_GET_ADDRESS_TEMPLATE, MsnSoapPartnerScenarioText[partner_scenario], update_str ? update_str : "");
+ body = g_strdup_printf(MSN_GET_ADDRESS_TEMPLATE,
+ MsnSoapPartnerScenarioText[partner_scenario],
+ msn_contact_get_token(contact),
+ update_str ? update_str : "");
msn_soap_message_send(contact->session,
msn_soap_message_new(MSN_GET_ADDRESS_SOAP_ACTION,
@@ -794,7 +822,9 @@ msn_add_contact(MsnContact *contact, Msn
purple_debug_info("MSNCL","Adding contact %s to contact list\n", passport);
contact_xml = g_strdup_printf(MSN_CONTACT_XML, passport);
- body = g_strdup_printf(MSN_ADD_CONTACT_TEMPLATE, contact_xml);
+ body = g_strdup_printf(MSN_ADD_CONTACT_TEMPLATE,
+ msn_contact_get_token(contact),
+ contact_xml);
msn_soap_message_send(contact->session,
msn_soap_message_new(MSN_CONTACT_ADD_SOAP_ACTION,
@@ -902,7 +932,10 @@ msn_add_contact_to_group(MsnContact *con
contact_xml = g_strdup_printf(MSN_CONTACT_XML, passport);
}
- body = g_strdup_printf(MSN_ADD_CONTACT_GROUP_TEMPLATE, groupId, contact_xml);
+ body = g_strdup_printf(MSN_ADD_CONTACT_GROUP_TEMPLATE,
+ msn_contact_get_token(contact),
+ groupId,
+ contact_xml);
msn_soap_message_send(state->session,
msn_soap_message_new(MSN_ADD_CONTACT_GROUP_SOAP_ACTION,
@@ -950,7 +983,9 @@ msn_delete_contact(MsnContact *contact,
/* build SOAP request */
purple_debug_info("MSNCL","Deleting contact with contactId: %s\n", contactId);
- body = g_strdup_printf(MSN_DEL_CONTACT_TEMPLATE, contact_id_xml);
+ body = g_strdup_printf(MSN_DEL_CONTACT_TEMPLATE,
+ msn_contact_get_token(contact),
+ contact_id_xml);
msn_soap_message_send(contact->session,
msn_soap_message_new(MSN_CONTACT_DEL_SOAP_ACTION,
xmlnode_from_str(body, -1)),
@@ -1022,7 +1057,10 @@ msn_del_contact_from_group(MsnContact *c
msn_callback_state_set_old_group_name(state, group_name);
contact_id_xml = g_strdup_printf(MSN_CONTACT_ID_XML, user->uid);
- body = g_strdup_printf(MSN_CONTACT_DEL_GROUP_TEMPLATE, contact_id_xml, groupId);
+ body = g_strdup_printf(MSN_CONTACT_DEL_GROUP_TEMPLATE,
+ msn_contact_get_token(contact),
+ contact_id_xml,
+ groupId);
msn_soap_message_send(contact->session,
msn_soap_message_new(MSN_CONTACT_DEL_GROUP_SOAP_ACTION,
@@ -1055,7 +1093,9 @@ msn_update_contact(MsnContact *contact,
escaped_nickname = g_markup_escape_text(nickname, -1);
- body = g_strdup_printf(MSN_CONTACT_UPDATE_TEMPLATE, escaped_nickname);
+ body = g_strdup_printf(MSN_CONTACT_UPDATE_TEMPLATE,
+ msn_contact_get_token(contact),
+ escaped_nickname);
msn_soap_message_send(contact->session,
msn_soap_message_new(MSN_CONTACT_UPDATE_SOAP_ACTION,
@@ -1134,6 +1174,7 @@ msn_del_contact_from_list(MsnContact *co
body = g_strdup_printf( MSN_CONTACT_DELECT_FROM_LIST_TEMPLATE,
MsnSoapPartnerScenarioText[partner_scenario],
+ msn_contact_get_token(contact),
MsnMemberRole[list],
member);
@@ -1206,6 +1247,7 @@ msn_add_contact_to_list(MsnContact *cont
body = g_strdup_printf(MSN_CONTACT_ADD_TO_LIST_TEMPLATE,
MsnSoapPartnerScenarioText[partner_scenario],
+ msn_contact_get_token(contact),
MsnMemberRole[list],
member);
@@ -1234,13 +1276,18 @@ msn_get_gleams(MsnContact *contact)
msn_get_gleams(MsnContact *contact)
{
MsnSoapReq *soap_request;
+ gchar *body = NULL;
purple_debug_info("MSNP14","msn get gleams info...\n");
+
+ body = g_strdup_printf(MSN_GLEAMS_TEMPLATE,
+ msn_contact_get_token(contact))
msn_soap_message_send(contact->session,
msn_soap_message_new(MSN_GET_GLEAMS_SOAP_ACTION,
- xmlnode_from_str(MSN_GLEAMS_TEMPLATE, -1)),
+ xmlnode_from_str(body, -1)),
MSN_CONTACT_SERVER, MSN_ADDRESS_BOOK_POST_URL,
msn_gleams_read_cb, NULL);
+ g_free(body);
}
#endif
@@ -1339,7 +1386,9 @@ msn_add_group(MsnSession *session, MsnCa
/* escape group name's html special chars so it can safely be sent
* in a XML SOAP request
*/
- body = g_markup_printf_escaped(MSN_GROUP_ADD_TEMPLATE, group_name);
+ body = g_markup_printf_escaped(MSN_GROUP_ADD_TEMPLATE,
+ msn_contact_get_token(session->contact),
+ group_name);
msn_soap_message_send(session,
msn_soap_message_new(MSN_GROUP_ADD_SOAP_ACTION,
@@ -1382,7 +1431,9 @@ msn_del_group(MsnSession *session, const
msn_callback_state_set_action(state, MSN_DEL_GROUP);
msn_callback_state_set_guid(state, guid);
- body = g_strdup_printf(MSN_GROUP_DEL_TEMPLATE, guid);
+ body = g_strdup_printf(MSN_GROUP_DEL_TEMPLATE,
+ msn_contact_get_token(session->contact),
+ guid);
msn_soap_message_send(session,
msn_soap_message_new(MSN_GROUP_DEL_SOAP_ACTION,
@@ -1424,7 +1475,8 @@ msn_contact_rename_group(MsnSession *ses
msn_callback_state_set_action(state, MSN_RENAME_GROUP);
body = g_markup_printf_escaped(MSN_GROUP_RENAME_TEMPLATE,
- guid, new_group_name);
+ msn_contact_get_token(session->contact),
+ guid, new_group_name);
msn_soap_message_send(session,
msn_soap_message_new(MSN_GROUP_RENAME_SOAP_ACTION,
============================================================
--- libpurple/protocols/msn/contact.h b4d6a9c60238a26328a9b4f9b32754dab8ed7b6a
+++ libpurple/protocols/msn/contact.h d92783f0e329462cd88b958de6ba338999544bb0
@@ -31,9 +31,12 @@
#define MSN_GET_CONTACT_POST_URL "/abservice/SharingService.asmx"
#define MSN_GET_CONTACT_SOAP_ACTION "http://www.msn.com/webservices/AddressBook/FindMembership"
-#define MSN_GET_CONTACT_UPDATE_XML "<View>Full</View>"\
+
+#define MSN_GET_CONTACT_UPDATE_XML \
+ "<View>Full</View>"\
"<deltasOnly>true</deltasOnly>"\
"<lastChange>%s</lastChange>"
+
#define MSN_GET_CONTACT_TEMPLATE "<?xml version='1.0' encoding='utf-8'?>"\
"<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"\
"<soap:Header xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"\
@@ -44,6 +47,7 @@
"</ABApplicationHeader>"\
"<ABAuthHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
"<ManagedGroupRequest xmlns=\"http://www.msn.com/webservices/AddressBook\">false</ManagedGroupRequest>"\
+ "<TicketToken>%s</TicketToken>"\
"</ABAuthHeader>"\
"</soap:Header>"\
"<soap:Body xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"\
@@ -72,7 +76,11 @@
#define MSN_ADD_ADDRESSBOOK_SOAP_ACTION "http://www.msn.com/webservices/AddressBook/ABAdd"
#define MSN_ADD_ADDRESSBOOK_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
-"<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">"\
+"<soap:Envelope"\
+ " xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\""\
+ " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""\
+ " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""\
+ " xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">"\
"<soap:Header>"\
"<ABApplicationHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
"<ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId>"\
@@ -81,6 +89,7 @@
"</ABApplicationHeader>"\
"<ABAuthHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
"<ManagedGroupRequest>false</ManagedGroupRequest>"\
+ "<TicketToken>%s</TicketToken>"\
"</ABAuthHeader>"\
"</soap:Header>"\
"<soap:Body>"\
@@ -98,7 +107,8 @@
/* Get AddressBook */
#define MSN_GET_ADDRESS_SOAP_ACTION "http://www.msn.com/webservices/AddressBook/ABFindAll"
#define MSN_GET_ADDRESS_FULL_TIME "0001-01-01T00:00:00.0000000-08:00"
-#define MSN_GET_ADDRESS_UPDATE_XML "<deltasOnly>true</deltasOnly>"\
+#define MSN_GET_ADDRESS_UPDATE_XML \
+ "<deltasOnly>true</deltasOnly>"\
"<lastChange>%s</lastChange>"
#define MSN_GET_GLEAM_UPDATE_XML \
@@ -107,7 +117,11 @@
"<dynamicItemLastChange>%s</dynamicItemLastChange>"
#define MSN_GET_ADDRESS_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
-"<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">"\
+"<soap:Envelope"\
+ " xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\""\
+ " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""\
+ " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""\
+ " xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">"\
"<soap:Header>"\
"<ABApplicationHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
"<ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId>"\
@@ -116,6 +130,7 @@
"</ABApplicationHeader>"\
"<ABAuthHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
"<ManagedGroupRequest>false</ManagedGroupRequest>"\
+ "<TicketToken>%s</TicketToken>"\
"</ABAuthHeader>"\
"</soap:Header>"\
"<soap:Body>"\
@@ -131,7 +146,11 @@
/*Gleams SOAP request template*/
#define MSN_GET_GLEAMS_SOAP_ACTION "http://www.msn.com/webservices/AddressBook/ABFindAll"
#define MSN_GLEAMS_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
-"<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">"\
+"<soap:Envelope"\
+ " xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\""\
+ " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""\
+ " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""\
+ " xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">"\
"<soap:Header>"\
"<ABApplicationHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
"<ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId>"\
@@ -140,6 +159,7 @@
"</ABApplicationHeader>"\
"<ABAuthHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
"<ManagedGroupRequest>false</ManagedGroupRequest>"\
+ "<TicketToken>%s</TicketToken>"\
"</ABAuthHeader>"\
"</soap:Header>"\
"<soap:Body>"\
@@ -157,26 +177,69 @@
* Contact Management SOAP actions
*******************************************************/
-/* Add a new contact t*/
+/* Add a new contact */
#define MSN_CONTACT_ADD_SOAP_ACTION "http://www.msn.com/webservices/AddressBook/ABContactAdd"
-#define MSN_CONTACT_LIVE_PENDING_XML "<Contact xmlns=\"http://www.msn.com/webservices/AddressBook\"><contactInfo><contactType>LivePending</contactType><passportName>%s</passportName><isMessengerUser>true</isMessengerUser></contactInfo></Contact>"
+#define MSN_CONTACT_LIVE_PENDING_XML \
+ "<Contact xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
+ "<contactInfo>"\
+ "<contactType>LivePending</contactType>"\
+ "<passportName>%s</passportName>"\
+ "<isMessengerUser>true</isMessengerUser>"\
+ "</contactInfo>"\
+ "</Contact>"
-#define MSN_CONTACT_XML "<Contact xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
- "<contactInfo>"\
- "<passportName>%s</passportName>"\
- "<isSmtp>false</isSmtp>"\
- "<isMessengerUser>true</isMessengerUser>"\
- "</contactInfo>"\
- "</Contact>"
+#define MSN_CONTACT_XML \
+ "<Contact xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
+ "<contactInfo>"\
+ "<passportName>%s</passportName>"\
+ "<isSmtp>false</isSmtp>"\
+ "<isMessengerUser>true</isMessengerUser>"\
+ "</contactInfo>"\
+ "</Contact>"
-#define MSN_CONTACT_DISPLAYNAME_XML "<Contact xmlns=\"http://www.msn.com/webservices/AddressBook\"><contactInfo><displayName>%s</displayName><passportName>%s</passportName><isMessengerUser>true</isMessengerUser></contactInfo></Contact>"
+#define MSN_CONTACT_DISPLAYNAME_XML \
+ "<Contact xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
+ "<contactInfo>"\
+ "<displayName>%s</displayName>"\
+ "<passportName>%s</passportName>"\
+ "<isMessengerUser>true</isMessengerUser>"\
+ "</contactInfo>"\
+ "</Contact>"
-#define MSN_ADD_CONTACT_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?><soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\"><soap:Header><ABApplicationHeader xmlns=\"http://www.msn.com/webservices/AddressBook\"><ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId><IsMigration>false</IsMigration><PartnerScenario>ContactSave</PartnerScenario></ABApplicationHeader><ABAuthHeader xmlns=\"http://www.msn.com/webservices/AddressBook\"><ManagedGroupRequest>false</ManagedGroupRequest></ABAuthHeader></soap:Header><soap:Body><ABContactAdd xmlns=\"http://www.msn.com/webservices/AddressBook\"><abId>00000000-0000-0000-0000-000000000000</abId><contacts>%s</contacts><options><EnableAllowListManagement>true</EnableAllowListManagement></options></ABContactAdd></soap:Body></soap:Envelope>"
+#define MSN_ADD_CONTACT_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
+"<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\""\
+ " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""\
+ " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""\
+ " xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">"\
+ "<soap:Header>"\
+ "<ABApplicationHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
+ "<ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId>"\
+ "<IsMigration>false</IsMigration>"\
+ "<PartnerScenario>ContactSave</PartnerScenario>"\
+ "</ABApplicationHeader>"\
+ "<ABAuthHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
+ "<ManagedGroupRequest>false</ManagedGroupRequest>"\
+ "<TicketToken>%s</TicketToken>"\
+ "</ABAuthHeader>"\
+ "</soap:Header>"\
+ "<soap:Body>"\
+ "<ABContactAdd xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
+ "<abId>00000000-0000-0000-0000-000000000000</abId>"\
+ "<contacts>%s</contacts>"\
+ "<options>"\
+ "<EnableAllowListManagement>true</EnableAllowListManagement>"\
+ "</options>"\
+ "</ABContactAdd>"\
+ "</soap:Body>"\
+"</soap:Envelope>"
/* Add a contact to a group */
#define MSN_ADD_CONTACT_GROUP_SOAP_ACTION "http://www.msn.com/webservices/AddressBook/ABGroupContactAdd"
#define MSN_ADD_CONTACT_GROUP_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
-"<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">"\
+"<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\""\
+ " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""\
+ " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""\
+ " xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">"\
"<soap:Header>"\
"<ABApplicationHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
"<ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId>"\
@@ -185,6 +248,7 @@
"</ABApplicationHeader>"\
"<ABAuthHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
"<ManagedGroupRequest>false</ManagedGroupRequest>"\
+ "<TicketToken>%s</TicketToken>"\
"</ABAuthHeader>"\
"</soap:Header>"\
"<soap:Body>"\
@@ -207,17 +271,72 @@
/* Delete a contact from the Contact List */
#define MSN_CONTACT_DEL_SOAP_ACTION "http://www.msn.com/webservices/AddressBook/ABContactDelete"
#define MSN_CONTACT_ID_XML "<Contact><contactId>%s</contactId></Contact>"
-#define MSN_DEL_CONTACT_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?><soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\"><soap:Header><ABApplicationHeader xmlns=\"http://www.msn.com/webservices/AddressBook\"><ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId><IsMigration>false</IsMigration><PartnerScenario>Timer</PartnerScenario></ABApplicationHeader><ABAuthHeader xmlns=\"http://www.msn.com/webservices/AddressBook\"><ManagedGroupRequest>false</ManagedGroupRequest></ABAuthHeader></soap:Header><soap:Body><ABContactDelete xmlns=\"http://www.msn.com/webservices/AddressBook\"><abId>00000000-0000-0000-0000-000000000000</abId><contacts>%s</contacts></ABContactDelete></soap:Body></soap:Envelope>"
+#define MSN_DEL_CONTACT_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
+"<soap:Envelope"\
+ " xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\""\
+ " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""\
+ " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""\
+ " xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">"\
+ "<soap:Header>"\
+ "<ABApplicationHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
+ "<ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId>"\
+ "<IsMigration>false</IsMigration>"\
+ "<PartnerScenario>Timer</PartnerScenario>"\
+ "</ABApplicationHeader>"\
+ "<ABAuthHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
+ "<ManagedGroupRequest>false</ManagedGroupRequest>"\
+ "<TicketToken>%s</TicketToken>"\
+ "</ABAuthHeader>"\
+ "</soap:Header>"\
+ "<soap:Body>"\
+ "<ABContactDelete xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
+ "<abId>00000000-0000-0000-0000-000000000000</abId>"\
+ "<contacts>%s</contacts>"\
+ "</ABContactDelete>"\
+ "</soap:Body>"\
+"</soap:Envelope>"
/* Remove a contact from a group */
#define MSN_CONTACT_DEL_GROUP_SOAP_ACTION "http://www.msn.com/webservices/AddressBook/ABGroupContactDelete"
-#define MSN_CONTACT_DEL_GROUP_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?><soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\"><soap:Header><ABApplicationHeader xmlns=\"http://www.msn.com/webservices/AddressBook\"><ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId><IsMigration>false</IsMigration><PartnerScenario>Timer</PartnerScenario></ABApplicationHeader><ABAuthHeader xmlns=\"http://www.msn.com/webservices/AddressBook\"><ManagedGroupRequest>false</ManagedGroupRequest></ABAuthHeader></soap:Header><soap:Body><ABGroupContactDelete xmlns=\"http://www.msn.com/webservices/AddressBook\"><abId>00000000-0000-0000-0000-000000000000</abId><contacts>%s</contacts><groupFilter><groupIds><guid>%s</guid></groupIds></groupFilter></ABGroupContactDelete></soap:Body></soap:Envelope>"
+#define MSN_CONTACT_DEL_GROUP_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
+"<soap:Envelope"\
+ " xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\""\
+ " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""\
+ " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""\
+ " xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">"\
+ "<soap:Header>"\
+ "<ABApplicationHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
+ "<ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId>"\
+ "<IsMigration>false</IsMigration>"\
+ "<PartnerScenario>Timer</PartnerScenario>"\
+ "</ABApplicationHeader>"\
+ "<ABAuthHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
+ "<ManagedGroupRequest>false</ManagedGroupRequest>"\
+ "<TicketToken>%s</TicketToken>"\
+ "</ABAuthHeader>"\
+ "</soap:Header>"\
+ "<soap:Body>"\
+ "<ABGroupContactDelete xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
+ "<abId>00000000-0000-0000-0000-000000000000</abId>"\
+ "<contacts>%s</contacts>"\
+ "<groupFilter>"\
+ "<groupIds>"\
+ "<guid>%s</guid>"\
+ "</groupIds>"\
+ "</groupFilter>"\
+ "</ABGroupContactDelete>"\
+ "</soap:Body>"\
+"</soap:Envelope>"
/* Update Contact Nickname */
#define MSN_CONTACT_UPDATE_SOAP_ACTION "http://www.msn.com/webservices/AddressBook/ABContactUpdate"
#define MSN_CONTACT_UPDATE_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
-"<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">"\
+"<soap:Envelope"\
+ " xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\""\
+ " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""\
+ " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""\
+ " xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">"\
"<soap:Header>"\
"<ABApplicationHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
"<ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId>"\
@@ -226,6 +345,7 @@
"</ABApplicationHeader>"\
"<ABAuthHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
"<ManagedGroupRequest>false</ManagedGroupRequest>"\
+ "<TicketToken>%s</TicketToken>"\
"</ABAuthHeader>"\
"</soap:Header>"\
"<soap:Body>"\
@@ -255,22 +375,28 @@
#define MSN_ADD_MEMBER_TO_LIST_SOAP_ACTION "http://www.msn.com/webservices/AddressBook/AddMember"
#define MSN_DELETE_MEMBER_FROM_LIST_SOAP_ACTION "http://www.msn.com/webservices/AddressBook/DeleteMember"
-#define MSN_MEMBER_PASSPORT_XML "<Member xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:type=\"PassportMember\">"\
- "<Type>Passport</Type>"\
- "<State>Accepted</State>"\
- "<PassportName>%s</PassportName>"\
- "</Member>"
+#define MSN_MEMBER_PASSPORT_XML \
+ "<Member xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:type=\"PassportMember\">"\
+ "<Type>Passport</Type>"\
+ "<State>Accepted</State>"\
+ "<PassportName>%s</PassportName>"\
+ "</Member>"
-#define MSN_MEMBER_MEMBERSHIPID_XML "<Member xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:type=\"PassportMember\">"\
- "<Type>Passport</Type>"\
- "<MembershipId>%u</MembershipId>"\
- "<State>Accepted</State>"\
- "</Member>"
+#define MSN_MEMBER_MEMBERSHIPID_XML \
+ "<Member xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:type=\"PassportMember\">"\
+ "<Type>Passport</Type>"\
+ "<MembershipId>%u</MembershipId>"\
+ "<State>Accepted</State>"\
+ "</Member>"
/* first delete contact from allow list */
#define MSN_CONTACT_DELECT_FROM_LIST_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
-"<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">"\
+"<soap:Envelope"\
+ " xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\""\
+ " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""\
+ " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""\
+ " xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">"\
"<soap:Header>"\
"<ABApplicationHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
"<ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId>"\
@@ -279,6 +405,7 @@
"</ABApplicationHeader>"\
"<ABAuthHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
"<ManagedGroupRequest>false</ManagedGroupRequest>"\
+ "<TicketToken>%s</TicketToken>"\
"</ABAuthHeader>"\
"</soap:Header>"\
"<soap:Body>"\
@@ -301,7 +428,11 @@
"</soap:Envelope>"
#define MSN_CONTACT_ADD_TO_LIST_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
-"<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">"\
+"<soap:Envelope"\
+ " xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\""\
+ " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""\
+ " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""\
+ " xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">"\
"<soap:Header>"\
"<ABApplicationHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
"<ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId>"\
@@ -310,6 +441,7 @@
"</ABApplicationHeader>"\
"<ABAuthHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
"<ManagedGroupRequest>false</ManagedGroupRequest>"\
+ "<TicketToken>%s</TicketToken>"\
"</ABAuthHeader>"\
"</soap:Header>"\
"<soap:Body>"\
@@ -339,15 +471,111 @@
/* add a group */
#define MSN_GROUP_ADD_SOAP_ACTION "http://www.msn.com/webservices/AddressBook/ABGroupAdd"
-#define MSN_GROUP_ADD_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?><soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\"><soap:Header><ABApplicationHeader xmlns=\"http://www.msn.com/webservices/AddressBook\"><ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId><IsMigration>false</IsMigration><PartnerScenario>GroupSave</PartnerScenario></ABApplicationHeader><ABAuthHeader xmlns=\"http://www.msn.com/webservices/AddressBook\"><ManagedGroupRequest>false</ManagedGroupRequest></ABAuthHeader></soap:Header><soap:Body><ABGroupAdd xmlns=\"http://www.msn.com/webservices/AddressBook\"><abId>00000000-0000-0000-0000-000000000000</abId><groupAddOptions><fRenameOnMsgrConflict>false</fRenameOnMsgrConflict></groupAddOptions><groupInfo><GroupInfo><name>%s</name><groupType>C8529CE2-6EAD-434d-881F-341E17DB3FF8</groupType><fMessenger>false</fMessenger><annotations><Annotation><Name>MSN.IM.Display</Name><Value>1</Value></Annotation></annotations></GroupInfo></groupInfo></ABGroupAdd></soap:Body></soap:Envelope>"
+#define MSN_GROUP_ADD_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
+"<soap:Envelope"\
+ " xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\""\
+ " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""\
+ " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""\
+ " xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">"\
+ "<soap:Header>"\
+ "<ABApplicationHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
+ "<ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId>"\
+ "<IsMigration>false</IsMigration>"\
+ "<PartnerScenario>GroupSave</PartnerScenario>"\
+ "</ABApplicationHeader>"\
+ "<ABAuthHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
+ "<ManagedGroupRequest>false</ManagedGroupRequest>"\
+ "<TicketToken>%s</TicketToken>"\
+ "</ABAuthHeader>"\
+ "</soap:Header>"\
+ "<soap:Body>"\
+ "<ABGroupAdd xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
+ "<abId>00000000-0000-0000-0000-000000000000</abId>"\
+ "<groupAddOptions>"\
+ "<fRenameOnMsgrConflict>false</fRenameOnMsgrConflict>"\
+ "</groupAddOptions>"\
+ "<groupInfo>"\
+ "<GroupInfo>"\
+ "<name>%s</name>"\
+ "<groupType>C8529CE2-6EAD-434d-881F-341E17DB3FF8</groupType>"\
+ "<fMessenger>false</fMessenger>"\
+ "<annotations>"\
+ "<Annotation>"\
+ "<Name>MSN.IM.Display</Name>"\
+ "<Value>1</Value>"\
+ "</Annotation>"\
+ "</annotations>"\
+ "</GroupInfo>"\
+ "</groupInfo>"\
+ "</ABGroupAdd>"\
+ "</soap:Body>"\
+"</soap:Envelope>"
/* delete a group */
#define MSN_GROUP_DEL_SOAP_ACTION "http://www.msn.com/webservices/AddressBook/ABGroupDelete"
-#define MSN_GROUP_DEL_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?><soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\"><soap:Header><ABApplicationHeader xmlns=\"http://www.msn.com/webservices/AddressBook\"><ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId><IsMigration>false</IsMigration><PartnerScenario>Timer</PartnerScenario></ABApplicationHeader><ABAuthHeader xmlns=\"http://www.msn.com/webservices/AddressBook\"><ManagedGroupRequest>false</ManagedGroupRequest></ABAuthHeader></soap:Header><soap:Body><ABGroupDelete xmlns=\"http://www.msn.com/webservices/AddressBook\"><abId>00000000-0000-0000-0000-000000000000</abId><groupFilter><groupIds><guid>%s</guid></groupIds></groupFilter></ABGroupDelete></soap:Body></soap:Envelope>"
+#define MSN_GROUP_DEL_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
+"<soap:Envelope"\
+ " xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\""\
+ " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""\
+ " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""\
+ " xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">"\
+ "<soap:Header>"\
+ "<ABApplicationHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
+ "<ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId>"\
+ "<IsMigration>false</IsMigration>"\
+ "<PartnerScenario>Timer</PartnerScenario>"\
+ "</ABApplicationHeader>"\
+ "<ABAuthHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
+ "<ManagedGroupRequest>false</ManagedGroupRequest>"\
+ "<TicketToken>%s</TicketToken>"\
+ "</ABAuthHeader>"\
+ "</soap:Header>"\
+ "<soap:Body>"\
+ "<ABGroupDelete xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
+ "<abId>00000000-0000-0000-0000-000000000000</abId>"\
+ "<groupFilter>"\
+ "<groupIds>"\
+ "<guid>%s</guid>"\
+ "</groupIds>"\
+ "</groupFilter>"\
+ "</ABGroupDelete>"\
+ "</soap:Body>"\
+"</soap:Envelope>"
/* change a group's name */
#define MSN_GROUP_RENAME_SOAP_ACTION "http://www.msn.com/webservices/AddressBook/ABGroupUpdate"
-#define MSN_GROUP_RENAME_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?><soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\"><soap:Header><ABApplicationHeader xmlns=\"http://www.msn.com/webservices/AddressBook\"><ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId><IsMigration>false</IsMigration><PartnerScenario>Timer</PartnerScenario></ABApplicationHeader><ABAuthHeader xmlns=\"http://www.msn.com/webservices/AddressBook\"><ManagedGroupRequest>false</ManagedGroupRequest></ABAuthHeader></soap:Header><soap:Body><ABGroupUpdate xmlns=\"http://www.msn.com/webservices/AddressBook\"><abId>00000000-0000-0000-0000-000000000000</abId><groups><Group><groupId>%s</groupId><groupInfo><name>%s</name></groupInfo><propertiesChanged>GroupName </propertiesChanged></Group></groups></ABGroupUpdate></soap:Body></soap:Envelope>"
+#define MSN_GROUP_RENAME_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
+"<soap:Envelope"\
+ " xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\""\
+ " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""\
+ " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""\
+ " xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">"\
+ "<soap:Header>"\
+ "<ABApplicationHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
+ "<ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId>"\
+ "<IsMigration>false</IsMigration>"\
+ "<PartnerScenario>Timer</PartnerScenario>"\
+ "</ABApplicationHeader>"\
+ "<ABAuthHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
+ "<ManagedGroupRequest>false</ManagedGroupRequest>"\
+ "<TicketToken>%s</TicketToken>"\
+ "</ABAuthHeader>"\
+ "</soap:Header>"\
+ "<soap:Body>"\
+ "<ABGroupUpdate xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
+ "<abId>00000000-0000-0000-0000-000000000000</abId>"\
+ "<groups>"\
+ "<Group>"\
+ "<groupId>%s</groupId>"\
+ "<groupInfo>"\
+ "<name>%s</name>"\
+ "</groupInfo>"\
+ "<propertiesChanged>GroupName </propertiesChanged>"\
+ "</Group>"\
+ "</groups>"\
+ "</ABGroupUpdate>"\
+ "</soap:Body>"\
+"</soap:Envelope>"
typedef enum
{
============================================================
--- libpurple/protocols/msn/soap.c 7ff6d18928808d87a0c0d0e538f528144e93e088
+++ libpurple/protocols/msn/soap.c 6d77ff04da2b6ee0ef41e469b2df8fab599866a0
@@ -835,7 +835,6 @@ msn_soap_post_request(MsnSoapConn *soapc
"POST %s HTTP/1.1\r\n"
"SOAPAction: %s\r\n"
"Content-Type:text/xml; charset=utf-8\r\n"
- "Cookie: MSPAuth=%s\r\n"
"User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)\r\n"
"Accept: */*\r\n"
"Host: %s\r\n"
@@ -845,7 +844,6 @@ msn_soap_post_request(MsnSoapConn *soapc
"%s",
request->login_path,
request->soap_action,
- soapconn->session->passport_info.mspauth,
request->login_host,
strlen(request->body),
request->body
============================================================
--- libpurple/protocols/msn/soap2.c 226411eaa6290724ef3c408919ebc358d9fc143d
+++ libpurple/protocols/msn/soap2.c 9f93a9ca25a9570c47c1967894c6ac69059fa5b1
@@ -461,22 +461,15 @@ msn_soap_connection_run(gpointer data)
int len = -1;
char *body = xmlnode_to_str(req->message->xml, &len);
GSList *iter;
- char *authstr = NULL;
g_queue_pop_head(conn->queue);
conn->buf = g_string_new("");
- if (conn->session->passport_info.mspauth)
- authstr = g_strdup_printf("Cookie: MSPAuth=%s\r\n",
- conn->session->passport_info.mspauth);
-
-
g_string_append_printf(conn->buf,
"POST %s HTTP/1.1\r\n"
"SOAPAction: %s\r\n"
"Content-Type:text/xml; charset=utf-8\r\n"
- "%s"
"User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)\r\n"
"Accept: */*\r\n"
"Host: %s\r\n"
@@ -484,7 +477,7 @@ msn_soap_connection_run(gpointer data)
"Connection: Keep-Alive\r\n"
"Cache-Control: no-cache\r\n",
req->path, req->message->action ? req->message->action : "",
- authstr ? authstr : "", conn->host, len);
+ conn->host, len);
for (iter = req->message->headers; iter; iter = iter->next) {
g_string_append(conn->buf, (char *)iter->data);
@@ -503,7 +496,6 @@ msn_soap_connection_run(gpointer data)
PURPLE_INPUT_WRITE, msn_soap_write_cb, conn);
msn_soap_write_cb(conn, conn->ssl->fd, PURPLE_INPUT_WRITE);
- g_free(authstr);
g_free(body);
}
}
More information about the Commits
mailing list