Mercurial > pidgin
changeset 25963:9d931c8e9d90
The status_text variable is only used inside this block, so move
it all up in there
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Tue, 03 Mar 2009 20:29:11 +0000 |
parents | cc9fb95cede5 |
children | 8134074c05a3 |
files | libpurple/protocols/oscar/oscar.c |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/oscar/oscar.c Tue Mar 03 20:25:25 2009 +0000 +++ b/libpurple/protocols/oscar/oscar.c Tue Mar 03 20:29:11 2009 +0000 @@ -4812,7 +4812,6 @@ } else { - char *status_text = NULL; htmlaway = purple_status_get_attr_string(status, "message"); if ((htmlaway == NULL) || (*htmlaway == '\0')) @@ -4821,7 +4820,10 @@ /* ICQ 6.x seems to use an available message for all statuses so set one */ if (od->icq) { + char *status_text; + status_text = purple_markup_strip_html(htmlaway); + /* If the status_text is longer than 251 characters then truncate it */ if (strlen(status_text) > MAXAVAILMSGLEN) { @@ -4829,8 +4831,8 @@ strcpy(tmp, "..."); } aim_srv_setextrainfo(od, FALSE, 0, TRUE, status_text, NULL); + g_free(status_text); } - g_free(status_text); /* Set a proper away message for icq too so that they work for old third party clients */