# HG changeset patch # User Mark Doliner # Date 1186041055 0 # Node ID 88ad571744b42619b123fdbdf36e48c792f803e6 # Parent 900b13e40471dbbafba250fbafbb7e1d8a0210a7 Looks like AOL increased the length of available messages from 60 characters to 251. Fixes #2379. diff -r 900b13e40471 -r 88ad571744b4 libpurple/protocols/oscar/oscar.c --- a/libpurple/protocols/oscar/oscar.c Thu Aug 02 05:10:11 2007 +0000 +++ b/libpurple/protocols/oscar/oscar.c Thu Aug 02 07:50:55 2007 +0000 @@ -4523,9 +4523,9 @@ { status_text = purple_markup_strip_html(status_html); /* If the status_text is longer than 60 character then truncate it */ - if (strlen(status_text) > 60) + if (strlen(status_text) > MAXAVAILMSGLEN) { - char *tmp = g_utf8_find_prev_char(status_text, &status_text[58]); + char *tmp = g_utf8_find_prev_char(status_text, &status_text[MAXAVAILMSGLEN - 2]); strcpy(tmp, "..."); } } diff -r 900b13e40471 -r 88ad571744b4 libpurple/protocols/oscar/oscar.h --- a/libpurple/protocols/oscar/oscar.h Thu Aug 02 05:10:11 2007 +0000 +++ b/libpurple/protocols/oscar/oscar.h Thu Aug 02 07:50:55 2007 +0000 @@ -114,6 +114,11 @@ */ #define MAXCHATMSGLEN 512 +/* + * Found by trial and error. + */ +#define MAXAVAILMSGLEN 251 + /** * Maximum length for the password of an ICQ account */