aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-08-08 18:29:43 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2010-08-08 18:29:43 +0100
commit5fecede7db56a41cf9d6ecb2b821f5a833ce0f59 (patch)
tree5536020b4bae8a516e625020561101de281dccdd
parent2528cdad90271f80d2ffe0e679ff8258f3e94e4c (diff)
Enough changes to successfully login up to (but not including) fetching the
contact list.
-rw-r--r--protocols/msn/ns.c12
-rw-r--r--protocols/msn/sb.c1
-rw-r--r--protocols/msn/soap.c3
-rw-r--r--protocols/msn/soap.h2
4 files changed, 13 insertions, 5 deletions
diff --git a/protocols/msn/ns.c b/protocols/msn/ns.c
index 40c4cdec..897650a6 100644
--- a/protocols/msn/ns.c
+++ b/protocols/msn/ns.c
@@ -72,7 +72,7 @@ gboolean msn_ns_connected( gpointer data, gint source, b_input_condition cond )
md->handler->fd = md->fd;
md->handler->rxq = g_new0( char, 1 );
- g_snprintf( s, sizeof( s ), "VER %d MSNP8 CVR0\r\n", ++md->trId );
+ g_snprintf( s, sizeof( s ), "VER %d MSNP14 CVR0\r\n", ++md->trId );
if( msn_write( ic, s, strlen( s ) ) )
{
ic->inpa = b_input_add( md->fd, B_EV_IO_READ, msn_ns_callback, ic );
@@ -112,7 +112,7 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts )
if( strcmp( cmd[0], "VER" ) == 0 )
{
- if( cmd[2] && strncmp( cmd[2], "MSNP8", 5 ) != 0 )
+ if( cmd[2] && strncmp( cmd[2], "MSNP14", 5 ) != 0 )
{
imcb_error( ic, "Unsupported protocol" );
imc_logout( ic, FALSE );
@@ -229,7 +229,7 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts )
return( 0 );
}
}
- else if( num_parts >= 7 && strcmp( cmd[2], "OK" ) == 0 )
+ else if( strcmp( cmd[2], "OK" ) == 0 )
{
if( num_parts == 7 )
msn_ns_got_display_name( ic, cmd[4] );
@@ -655,6 +655,12 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts )
}
}
}
+ else if( strcmp( cmd[0], "GCF" ) == 0 )
+ {
+ /* Coming up is cmd[2] bytes of stuff we're supposed to
+ censore. Meh. */
+ md->handler->msglen = atoi( cmd[2] );
+ }
else if( isdigit( cmd[0][0] ) )
{
int num = atoi( cmd[0] );
diff --git a/protocols/msn/sb.c b/protocols/msn/sb.c
index 10425708..1eb919e3 100644
--- a/protocols/msn/sb.c
+++ b/protocols/msn/sb.c
@@ -29,6 +29,7 @@
#include "passport.h"
#include "md5.h"
#include "soap.h"
+#include "invitation.h"
static gboolean msn_sb_callback( gpointer data, gint source, b_input_condition cond );
static int msn_sb_command( gpointer data, char **cmd, int num_parts );
diff --git a/protocols/msn/soap.c b/protocols/msn/soap.c
index 82ecfea2..4d623a9d 100644
--- a/protocols/msn/soap.c
+++ b/protocols/msn/soap.c
@@ -154,7 +154,8 @@ static int msn_soap_oim_build_request( struct msn_soap_req_data *soap_req )
soap_req->action = g_strdup( SOAP_OIM_ACTION_URL );
soap_req->payload = g_markup_printf_escaped( SOAP_OIM_SEND_PAYLOAD,
ic->acc->user, display_name_b64, oim->to, md->passport_token,
- MSNP11_PROD_ID, md->lock_key ? : "", oim->number, oim->number, oim->msg );
+ MSNP11_PROD_ID, md->lock_key ? md->lock_key : "",
+ oim->number, oim->number, oim->msg );
g_free( display_name_b64 );
diff --git a/protocols/msn/soap.h b/protocols/msn/soap.h
index 3db2d59d..307ac1bc 100644
--- a/protocols/msn/soap.h
+++ b/protocols/msn/soap.h
@@ -73,7 +73,7 @@
"Content-Type: text/plain; charset=UTF-8\r\n" \
"Content-Transfer-Encoding: base64\r\n" \
"X-OIM-Message-Type: OfflineMessage\r\n" \
- "X-OIM-Run-Id: {89527393-8723-4F4F-8005-287532973298}\r\n" \
+ "X-OIM-Run-Id: {F9A6C9DD-0D94-4E85-9CC6-F9D118CC1CAF}\r\n" \
"X-OIM-Sequence-Num: %d\r\n" \
"\r\n" \
"%s" \