diff libpurple/protocols/mxit/filexfer.c @ 32819: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 280ef1bd125b
children
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 );