Mercurial > pidgin
changeset 32357:930820b18a8d
MXit is increasing the limit on the size of files that can be transferred.
author | andrew.victor@mxit.com |
---|---|
date | Wed, 02 Nov 2011 09:51:48 +0000 |
parents | 03efb97b552b |
children | 96f3af93ee98 |
files | libpurple/protocols/mxit/filexfer.c libpurple/protocols/mxit/protocol.c libpurple/protocols/mxit/protocol.h |
diffstat | 3 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/mxit/filexfer.c Tue Nov 01 17:28:17 2011 +0000 +++ b/libpurple/protocols/mxit/filexfer.c Wed Nov 02 09:51:48 2011 +0000 @@ -124,7 +124,7 @@ if ( purple_xfer_get_type( xfer ) == PURPLE_XFER_SEND ) { /* we are trying to send a file to MXit */ - if ( purple_xfer_get_size( xfer ) > CP_MAX_FILESIZE ) { + if ( purple_xfer_get_size( xfer ) > ( CP_MAX_PACKET - 1000 ) ) { /* need to reserve some space for packet headers */ /* the file is too big */ purple_xfer_error( purple_xfer_get_type( xfer ), purple_xfer_get_account( xfer ), purple_xfer_get_remote_user( xfer ), _( "The file you are trying to send is too large!" ) ); purple_xfer_cancel_local( xfer );
--- a/libpurple/protocols/mxit/protocol.c Tue Nov 01 17:28:17 2011 +0000 +++ b/libpurple/protocols/mxit/protocol.c Wed Nov 02 09:51:48 2011 +0000 @@ -718,7 +718,7 @@ "%s%c%i%c%s%c%s%c" /* dateOfBirth\1gender\1location\1capabilities\1 */ "%s%c%i%c%s%c%s" /* dc\1features\1dialingcode\1locale */ "%c%i%c%i", /* \1protocolVer\1lastRosterUpdate */ - session->encpwd, CP_FLD_TERM, clientVersion, CP_FLD_TERM, CP_MAX_FILESIZE, CP_FLD_TERM, profile->nickname, CP_FLD_TERM, + session->encpwd, CP_FLD_TERM, clientVersion, CP_FLD_TERM, CP_MAX_PACKET, CP_FLD_TERM, profile->nickname, CP_FLD_TERM, profile->birthday, CP_FLD_TERM, ( profile->male ) ? 1 : 0, CP_FLD_TERM, MXIT_DEFAULT_LOC, CP_FLD_TERM, MXIT_CP_CAP, CP_FLD_TERM, session->distcode, CP_FLD_TERM, features, CP_FLD_TERM, session->dialcode, CP_FLD_TERM, locale, CP_FLD_TERM, MXIT_CP_PROTO_VESION, CP_FLD_TERM, 0 @@ -765,7 +765,7 @@ session->encpwd, CP_FLD_TERM, clientVersion, CP_FLD_TERM, 1, CP_FLD_TERM, MXIT_CP_CAP, CP_FLD_TERM, session->distcode, CP_FLD_TERM, features, CP_FLD_TERM, session->dialcode, CP_FLD_TERM, locale, CP_FLD_TERM, - CP_MAX_FILESIZE, CP_FLD_TERM, MXIT_CP_PROTO_VESION, CP_FLD_TERM, 0 + CP_MAX_PACKET, CP_FLD_TERM, MXIT_CP_PROTO_VESION, CP_FLD_TERM, 0 ); /* include "custom resource" information */
--- a/libpurple/protocols/mxit/protocol.h Tue Nov 01 17:28:17 2011 +0000 +++ b/libpurple/protocols/mxit/protocol.h Wed Nov 02 09:51:48 2011 +0000 @@ -34,8 +34,7 @@ #define CP_PKT_TERM '\x02' /* packet terminator */ -#define CP_MAX_PACKET ( 1024 * 1024 ) /* maximum client protocol packet size (1 MiB) */ -#define CP_MAX_FILESIZE ( 150 * 1000 ) /* maximum client protocol file transfer size (150 KB) */ +#define CP_MAX_PACKET ( 1 * 1000 * 1000 ) /* maximum client protocol packet size (1 MB) */ #define MXIT_EMOTICON_SIZE 18 /* icon size for custom emoticons */ #define CP_MAX_STATUS_MSG 250 /* maximum status message length (in characters) */ @@ -77,6 +76,7 @@ #define MXIT_CF_GAMING_UPDATE 0x800000 #define MXIT_CF_VOICE 0x1000000 #define MXIT_CF_VIDEO 0x2000000 +#define MXIT_CF_TOUCHSCREEN 0x4000000 /* Client features supported by this implementation */ #define MXIT_CP_FEATURES ( MXIT_CF_FILE_TRANSFER | MXIT_CF_FILE_ACCESS | MXIT_CF_AUDIO | MXIT_CF_MARKUP | MXIT_CF_EXT_MARKUP | MXIT_CF_NO_GATEWAYS | MXIT_CF_IMAGES | MXIT_CF_COMMANDS | MXIT_CF_VIBES | MXIT_CF_MIDP2 )