pidgin: 377fab68: MXit is increasing the limit on the size...
andrew.victor at mxit.com
andrew.victor at mxit.com
Wed Nov 9 02:37:02 EST 2011
----------------------------------------------------------------------
Revision: 377fab6845c6367df5a06eac7afdc93bb2c62e73
Parent: 941f205e71bee6f0fe79442af21238c088eecbac
Author: andrew.victor at mxit.com
Date: 11/02/11 05:51:48
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/377fab6845c6367df5a06eac7afdc93bb2c62e73
Changelog:
MXit is increasing the limit on the size of files that can be transferred.
Changes against parent 941f205e71bee6f0fe79442af21238c088eecbac
patched libpurple/protocols/mxit/filexfer.c
patched libpurple/protocols/mxit/protocol.c
patched libpurple/protocols/mxit/protocol.h
-------------- next part --------------
============================================================
--- libpurple/protocols/mxit/filexfer.c a56559498da4a0aa5ac85aef33b1e1b271ea7aff
+++ libpurple/protocols/mxit/filexfer.c ae7019e85a8e5e7ceff124a7a443045f01d350e8
@@ -124,7 +124,7 @@ static void mxit_xfer_init( PurpleXfer*
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 );
============================================================
--- libpurple/protocols/mxit/protocol.c 90526fa92ad9cad261086134464ff4d1b241a8b9
+++ libpurple/protocols/mxit/protocol.c 99bd25324ca144ef7acbad8fdf2ac83b517afd13
@@ -718,7 +718,7 @@ void mxit_send_register( struct MXitSess
"%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 @@ void mxit_send_login( struct MXitSession
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 */
============================================================
--- libpurple/protocols/mxit/protocol.h f8c10dcf4d656f055ee0e9452e893b034a274f1e
+++ libpurple/protocols/mxit/protocol.h 3da9215cc34caf0877a7380b1db0d8630d2caa44
@@ -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 )
More information about the Commits
mailing list