Mercurial > pidgin
changeset 18774:88ad571744b4
Looks like AOL increased the length of available messages from 60
characters to 251.
Fixes #2379.
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 02 Aug 2007 07:50:55 +0000 |
parents | 900b13e40471 |
children | ee655cba03ca |
files | libpurple/protocols/oscar/oscar.c libpurple/protocols/oscar/oscar.h |
diffstat | 2 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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, "..."); } }
--- 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 */