pidgin: 48c374c0: Rather use the accessor function purple_...

andrew.victor at mxit.com andrew.victor at mxit.com
Thu Aug 25 02:45:47 EDT 2011


----------------------------------------------------------------------
Revision: 48c374c0a108d01eea9ef1d80b622a4c940dad92
Parent:   ff884d612889ec8d5f9c23a58e101ce65245ea19
Author:   andrew.victor at mxit.com
Date:     08/23/11 04:23:36
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/48c374c0a108d01eea9ef1d80b622a4c940dad92

Changelog: 

Rather use the accessor function purple_account_get_username().


Changes against parent ff884d612889ec8d5f9c23a58e101ce65245ea19

  patched  libpurple/protocols/mxit/login.c

-------------- next part --------------
============================================================
--- libpurple/protocols/mxit/login.c	c7e21c05defc7a351d65a40f5374043f3efd4c62
+++ libpurple/protocols/mxit/login.c	ec355e7a312d2722bb9c2d82ef8b2c50cf0f5931
@@ -53,13 +53,14 @@ static struct MXitSession* mxit_create_o
 	PurpleConnection*	con			= NULL;
 
 	/* currently the wapsite does not handle a '+' in front of the username (mxitid) so we just strip it */
-	if ( account->username[0] == '+' ) {
-		char*		fixed;
+	{
+		const char* username	= purple_account_get_username( account );
 
-		/* cut off the '+' */
-		fixed = g_strdup( &account->username[1] );
-		purple_account_set_username( account, fixed );
-		g_free( fixed );
+		if ( username[0] == '+' ) {
+			char* fixed	= g_strdup( &account->username[1] );
+			purple_account_set_username( account, fixed );
+			g_free( fixed );
+		}
 	}
 
 	session = g_new0( struct MXitSession, 1 );


More information about the Commits mailing list