im.pidgin.pidgin: 407625b32a0af3ca090b474845e8ff796b6453d3

markdoliner at pidgin.im markdoliner at pidgin.im
Sun Dec 2 04:35:38 EST 2007


-----------------------------------------------------------------
Revision: 407625b32a0af3ca090b474845e8ff796b6453d3
Ancestor: df2444b32fee20e7cf66b2c1bff247a472eda938
Author: markdoliner at pidgin.im
Date: 2007-12-02T09:25:29
Branch: im.pidgin.pidgin

Modified files:
        libpurple/protocols/oscar/family_icbm.c
        libpurple/protocols/oscar/oscar.h

ChangeLog: 

The current oscar max message size appears to be 2544.  I don't know
of a way to get this value from the server, but it seems likely that
they probably send it to us somewhere.

Anyhoo, this makes our error handling a little nicer when trying to
send a message that's too large

-------------- next part --------------
============================================================
--- libpurple/protocols/oscar/family_icbm.c	1396a264b2ece8dc0da7131139761b4be5c11022
+++ libpurple/protocols/oscar/family_icbm.c	1f9f5f90996c9d9ee96ae8b8a894601f4f690ce2
@@ -290,7 +290,7 @@ int aim_im_sendch1_ext(OscarData *od, st
 		if (!args->msg || (args->msglen <= 0))
 			return -EINVAL;
 
-		if (args->msglen >= MAXMSGLEN)
+		if (args->msglen > MAXMSGLEN)
 			return -E2BIG;
 	}
 
============================================================
--- libpurple/protocols/oscar/oscar.h	fe3baca8018047263d05a3b58cb0e346b165629a
+++ libpurple/protocols/oscar/oscar.h	fa0835ae56a2f99744a30266ac463dc31659375d
@@ -94,11 +94,8 @@ extern "C" {
  * for WinAIM clients (up through the latest (4.0.1957)) to
  * send any more than 1kb.  Amaze all your windows friends
  * with utterly oversized instant messages!
- *
- * TODO: the real limit is the total SNAC size at 8192. Fix this.
- *
  */
-#define MAXMSGLEN 7987
+#define MAXMSGLEN 2544
 
 /*
  * Maximum size of a Buddy Icon.


More information about the Commits mailing list