qulogic/pidgin

msn: Send XfrCount to NS.
draft msnp21
2014-12-23, Elliott Sales de Andrade
01220a043dd6
Parents cb1268c5a3a5
Children e5196af1860c
msn: Send XfrCount to NS.
--- a/libpurple/protocols/msn/notification.c Tue Dec 23 16:22:05 2014 -0500
+++ b/libpurple/protocols/msn/notification.c Tue Dec 23 16:26:21 2014 -0500
@@ -242,6 +242,8 @@
gboolean protocol_supported = FALSE;
guint proto_ver;
size_t i;
+ gchar *xfr_count;
+ gchar *xfr_b64;
session = cmdproc->session;
account = session->account;
@@ -268,6 +270,10 @@
purple_debug_info("msn", "Negotiated protocol version %d with the server.\n", session->protocol_ver);
+ session->xfr_count++;
+ xfr_count = g_strdup_printf("Version: 1\r\nXfrCount: %d", session->xfr_count);
+ xfr_b64 = purple_base64_encode((const guchar *)xfr_count, strlen(xfr_count));
+
/*
* Windows Live Messenger 8.5
* Notice :CVR String discriminate!
@@ -275,9 +281,12 @@
* to see the Local ID
*/
trans = msn_transaction_new(cmdproc, "CVR",
- "0x0409 winnt 5.1 i386 MSNMSGR 8.5.1302 BC01 %s",
- purple_account_get_username(account));
+ "0x0409 winnt 5.1 i386 MSNMSGR 8.5.1302 BC01 %s %s",
+ purple_account_get_username(account), xfr_b64);
msn_cmdproc_send_trans(cmdproc, trans);
+
+ g_free(xfr_count);
+ g_free(xfr_b64);
}
/**************************************************************************
--- a/libpurple/protocols/msn/session.h Tue Dec 23 16:22:05 2014 -0500
+++ b/libpurple/protocols/msn/session.h Tue Dec 23 16:26:21 2014 -0500
@@ -76,6 +76,7 @@
MsnUser *user;
guint protocol_ver;
+ guint xfr_count;
MsnLoginStep login_step; /**< The current step in the login process. */