pidgin.mxit: 52cb0cc1: When logging-in with the HTTP protocol, ...

andrew.victor at mxit.com andrew.victor at mxit.com
Tue May 4 17:15:46 EDT 2010


-----------------------------------------------------------------
Revision: 52cb0cc1b49e76b923073e23934af6c8471b984b
Ancestor: 82175cfc320b7c831512ecc2a00beec2a86b7a2a
Author: andrew.victor at mxit.com
Date: 2010-05-04T21:09:52
Branch: im.pidgin.pidgin.mxit
URL: http://d.pidgin.im/viewmtn/revision/info/52cb0cc1b49e76b923073e23934af6c8471b984b

Modified files:
        libpurple/protocols/mxit/protocol.c

ChangeLog: 

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.


-------------- next part --------------
============================================================
--- libpurple/protocols/mxit/protocol.c	7ba39be10c1671df49e3da05090a6c89c8de6598
+++ libpurple/protocols/mxit/protocol.c	2efcc788cd6e2c6d04707b80e657bb010eb3d2eb
@@ -1266,6 +1266,15 @@ static void mxit_parse_cmd_login( struct
 	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 @@ static void mxit_parse_cmd_login( struct
 		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 );
 }


More information about the Commits mailing list