# HG changeset patch # User andrew.victor@mxit.com # Date 1273007392 0 # Node ID 1147389b54241c3be2182e55c58591706e471a01 # Parent ce52e101844a838a92445e9337eff892b7db3d96 When logging-in with the HTTP protocol, we need to save the HTTP info (server address, session id) *before* checking the current presence state. Otherwise mxit_send_presence() might be called which will generate and send an invalid MXit HTTP packet. diff -r ce52e101844a -r 1147389b5424 libpurple/protocols/mxit/protocol.c --- a/libpurple/protocols/mxit/protocol.c Mon May 03 20:23:17 2010 +0000 +++ b/libpurple/protocols/mxit/protocol.c Tue May 04 21:09:52 2010 +0000 @@ -1266,6 +1266,15 @@ purple_connection_update_progress( session->con, _( "Successfully Logged In..." ), 3, 4 ); purple_connection_set_state( session->con, PURPLE_CONNECTED ); + /* save extra info if this is a HTTP connection */ + if ( session->http ) { + /* save the http server to use for this session */ + g_strlcpy( session->http_server, records[1]->fields[3]->data, sizeof( session->http_server ) ); + + /* save the session id */ + session->http_sesid = atoi( records[0]->fields[0]->data ); + } + /* display the current splash-screen */ if ( splash_popup_enabled( session ) ) splash_display( session ); @@ -1290,15 +1299,6 @@ g_free( statusmsg2 ); } - /* save extra info if this is a HTTP connection */ - if ( session->http ) { - /* save the http server to use for this session */ - g_strlcpy( session->http_server, records[1]->fields[3]->data, sizeof( session->http_server ) ); - - /* save the session id */ - session->http_sesid = atoi( records[0]->fields[0]->data ); - } - /* retrieve our MXit profile */ mxit_send_extprofile_request( session, NULL, ARRAY_SIZE( profilelist ), profilelist ); }