# HG changeset patch # User Mark Doliner # Date 1196587529 0 # Node ID d69d729ba19c0ecdb0b7f135052b41a9669e1bd1 # Parent b3e4b81456b09bc5ce46715a10fd6a6fd390730d 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 diff -r b3e4b81456b0 -r d69d729ba19c libpurple/protocols/oscar/family_icbm.c --- a/libpurple/protocols/oscar/family_icbm.c Sun Dec 02 08:39:31 2007 +0000 +++ b/libpurple/protocols/oscar/family_icbm.c Sun Dec 02 09:25:29 2007 +0000 @@ -290,7 +290,7 @@ if (!args->msg || (args->msglen <= 0)) return -EINVAL; - if (args->msglen >= MAXMSGLEN) + if (args->msglen > MAXMSGLEN) return -E2BIG; } diff -r b3e4b81456b0 -r d69d729ba19c libpurple/protocols/oscar/oscar.h --- a/libpurple/protocols/oscar/oscar.h Sun Dec 02 08:39:31 2007 +0000 +++ b/libpurple/protocols/oscar/oscar.h Sun Dec 02 09:25:29 2007 +0000 @@ -94,11 +94,8 @@ * 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.