Mercurial > pidgin
changeset 28067:ea7e54c4d7fd
Check for empty messages before sending them in chats. This is the same
send-only-HR's problem that affected IM's.
References #8057.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sun, 23 Aug 2009 01:03:07 +0000 |
parents | 54efb427b91a |
children | afe6ce7cc64f |
files | libpurple/protocols/msn/msn.c |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/msn/msn.c Sat Aug 22 23:58:18 2009 +0000 +++ b/libpurple/protocols/msn/msn.c Sun Aug 23 01:03:07 2009 +0000 @@ -1722,6 +1722,7 @@ MsnMessage *msg; char *msgformat; char *msgtext; + size_t msglen; account = purple_connection_get_account(gc); session = gc->proto_data; @@ -1736,8 +1737,9 @@ swboard->flag |= MSN_SB_FLAG_IM; msn_import_html(message, &msgformat, &msgtext); - - if (strlen(msgtext) + strlen(msgformat) + strlen(VERSION) > 1564) + msglen = strlen(msgtext); + + if ((msglen == 0) || (msglen + strlen(msgformat) + strlen(VERSION) > 1564)) { g_free(msgformat); g_free(msgtext);