# HG changeset patch # User pieter.loubser@mxit.com # Date 1294901801 0 # Node ID 754459ff7b23ccd97a050b6adbe6438b0b35df5e # Parent b9dc45392feb16163c13bfa126bc5f2e2a0bc1df * removed unneeded variable passing. diff -r b9dc45392feb -r 754459ff7b23 libpurple/protocols/mxit/chunk.c --- a/libpurple/protocols/mxit/chunk.c Wed Sep 15 08:28:39 2010 +0000 +++ b/libpurple/protocols/mxit/chunk.c Thu Jan 13 06:56:41 2011 +0000 @@ -406,10 +406,9 @@ * @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 @@ 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; } diff -r b9dc45392feb -r 754459ff7b23 libpurple/protocols/mxit/chunk.h --- a/libpurple/protocols/mxit/chunk.h Wed Sep 15 08:28:39 2010 +0000 +++ b/libpurple/protocols/mxit/chunk.h Thu Jan 13 06:56:41 2011 +0000 @@ -152,7 +152,7 @@ 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 ); diff -r b9dc45392feb -r 754459ff7b23 libpurple/protocols/mxit/login.c --- a/libpurple/protocols/mxit/login.c Wed Sep 15 08:28:39 2010 +0000 +++ b/libpurple/protocols/mxit/login.c Thu Jan 13 06:56:41 2011 +0000 @@ -141,9 +141,10 @@ } /* 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 ); + } } diff -r b9dc45392feb -r 754459ff7b23 libpurple/protocols/mxit/protocol.c --- a/libpurple/protocols/mxit/protocol.c Wed Sep 15 08:28:39 2010 +0000 +++ b/libpurple/protocols/mxit/protocol.c Thu Jan 13 06:56:41 2011 +0000 @@ -1271,7 +1271,7 @@ /* 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;