pidgin.mxit: 839e701f: * removed unneeded variable passing.

pieter.loubser at mxit.com pieter.loubser at mxit.com
Thu Jan 13 02:05:49 EST 2011


----------------------------------------------------------------------
Revision: 839e701f0bed423381c8148bce912f6f0b614854
Parent:   9730a51a2a0b97e1fb3531f834691a0c097791a2
Author:   pieter.loubser at mxit.com
Date:     01/13/11 01:56:41
Branch:   im.pidgin.pidgin.mxit
URL: http://d.pidgin.im/viewmtn/revision/info/839e701f0bed423381c8148bce912f6f0b614854

Changelog: 

 * removed unneeded variable passing.


Changes against parent 9730a51a2a0b97e1fb3531f834691a0c097791a2

  patched  libpurple/protocols/mxit/chunk.c
  patched  libpurple/protocols/mxit/chunk.h
  patched  libpurple/protocols/mxit/login.c
  patched  libpurple/protocols/mxit/protocol.c

-------------- next part --------------
============================================================
--- libpurple/protocols/mxit/chunk.c	263371e7f9761c36bd7257bdd29eb1c65163236e
+++ libpurple/protocols/mxit/chunk.c	e37c69811c899a803e00cbe998de411ed19f260d
@@ -406,10 +406,9 @@ int mxit_chunk_create_set_avatar( char* 
  *  @param chunkdata		Chunked-data buffer
  *  @param mxitId			The username who's avatar to download
  *  @param avatarId			The Id of the avatar image (as string)
- *  @param imgsize			The resolution of the avatar image
  *  @return					The number of bytes encoded in the buffer
  */
-int mxit_chunk_create_get_avatar( char* chunkdata, const char* mxitId, const char* avatarId, unsigned int imgsize )
+int mxit_chunk_create_get_avatar( char* chunkdata, const char* mxitId, const char* avatarId )
 {
 	int			pos = 0;
 
@@ -432,7 +431,7 @@ int mxit_chunk_create_get_avatar( char* 
 	pos += add_int16( &chunkdata[pos], 1 );
 
 	/* image size [4 bytes] */
-	pos += add_int32( &chunkdata[pos], imgsize );
+	pos += add_int32( &chunkdata[pos], MXIT_AVATAR_SIZE );
 
 	return pos;
 }
============================================================
--- libpurple/protocols/mxit/chunk.h	cfa3fad51bfa0a5a6ff0a7f9e416b3137ab432e7
+++ libpurple/protocols/mxit/chunk.h	89235508caccc62f6ad885e1c23830a8e27db485
@@ -152,7 +152,7 @@ int mxit_chunk_create_set_avatar( char* 
 int mxit_chunk_create_get( char* chunkdata, const char* fileid, int filesize, int offset );
 int mxit_chunk_create_received( char* chunkdata, const char* fileid, unsigned char status );
 int mxit_chunk_create_set_avatar( char* chunkdata, const unsigned char* data, int datalen );
-int mxit_chunk_create_get_avatar( char* chunkdata, const char* mxitId, const char* avatarId, unsigned int imgsize );
+int mxit_chunk_create_get_avatar( char* chunkdata, const char* mxitId, const char* avatarId );
 
 /* Decode chunk */
 void mxit_chunk_parse_offer( char* chunkdata, int datalen, struct offerfile_chunk* offer );
============================================================
--- libpurple/protocols/mxit/login.c	ac4559e63c137a4949de736f0a022afa3b819683
+++ libpurple/protocols/mxit/login.c	68ad6e13456bb42cef1da76488c663010aa5189a
@@ -141,9 +141,10 @@ static void mxit_connected( struct MXitS
 	}
 
 	/* This timer might already exist if we're registering a new account */
-	if ( session->q_timer == 0 )
+	if ( session->q_timer == 0 ) {
 		/* start the tx queue manager timer */
 		session->q_timer = purple_timeout_add_seconds( 2, mxit_manage_queue, session );
+	}
 }
 
 
============================================================
--- libpurple/protocols/mxit/protocol.c	3284d0181ce1211b38f711f17020957ae4c2051e
+++ libpurple/protocols/mxit/protocol.c	5ce05faa8de0c047f41281e219a496fcf6d87aeb
@@ -1271,7 +1271,7 @@ void mxit_get_avatar( struct MXitSession
 	/* map chunk header over data buffer */
 	chunk = &data[datalen];
 
-	size = mxit_chunk_create_get_avatar( chunk_data(chunk), mxitId, avatarId, MXIT_AVATAR_SIZE );
+	size = mxit_chunk_create_get_avatar( chunk_data(chunk), mxitId, avatarId );
 	if ( size < 0 ) {
 		purple_debug_error( MXIT_PLUGIN_ID, "Error creating get avatar chunk (%i)\n", size );
 		return;


More information about the Commits mailing list