# HG changeset patch # User Ma Yuan # Date 1156581097 0 # Node ID 9cc3a340781676fa64b248f344dc201992838213 # Parent a8d00b8dae40ea925c3d5e1f2dd041f83f4ab8b3 [gaim-migrate @ 17041] fix the Offline Instant Message sequence bug committed by MaYuan committer: Ethan Blanton diff -r a8d00b8dae40 -r 9cc3a3407816 src/protocols/msn/contact.c --- a/src/protocols/msn/contact.c Sat Aug 26 08:07:08 2006 +0000 +++ b/src/protocols/msn/contact.c Sat Aug 26 08:31:37 2006 +0000 @@ -106,6 +106,13 @@ if(!strcmp(type,"Regular")){ return 1; } + if(!strcmp(type,"Live")){ + return 1; + } + if(!strcmp(type,"LivePending")){ + return 1; + } + return 0; } @@ -325,6 +332,13 @@ contactType = xmlnode_get_child(contactInfo,"contactType"); type = xmlnode_get_data(contactType); + /*setup the Display Name*/ + if (!strcmp(type, "Me")){ + char *friendly = xmlnode_get_data(xmlnode_get_child(contactInfo,"displayName")); + gaim_connection_set_display_name(session->account->gc, gaim_url_decode(friendly)); + g_free(friendly); + } + passportName = xmlnode_get_child(contactInfo,"passportName"); if(passportName == NULL){ xmlnode *emailsNode, *contactEmailNode, *emailNode; diff -r a8d00b8dae40 -r 9cc3a3407816 src/protocols/msn/oim.c --- a/src/protocols/msn/oim.c Sat Aug 26 08:07:08 2006 +0000 +++ b/src/protocols/msn/oim.c Sat Aug 26 08:31:37 2006 +0000 @@ -115,7 +115,7 @@ gaim_debug_info("MaYuan","encode OIM Message...\n"); oim_base64 = gaim_base64_encode((const guchar *)body, strlen(body)); gaim_debug_info("MaYuan","encoded base64 body:{%s}\n",oim_base64); - + gaim_debug_info("MaYuan","url_encode:{%s}\n",gaim_url_encode(body)); oim_body = g_strdup_printf(MSN_OIM_MSG_TEMPLATE, oim->run_id,oim->send_seq,oim_base64); @@ -257,7 +257,6 @@ */ if(oim->challenge != NULL){ msn_handle_chl(oim->challenge, buf); - oim_request->send_seq++; }else{ gaim_debug_info("MaYuan","no lock key challenge,wait for SOAP Fault and Resend\n"); buf[0]='\0'; @@ -284,6 +283,10 @@ g_free(msg_body); g_free(soap_body); + /*increase the offline Sequence control*/ + if(oim->challenge != NULL){ + oim->send_seq++; + } msn_soap_post(oim->sendconn,soap_request,msn_oim_send_connect_init); }