# HG changeset patch # User Mark Doliner # Date 1236112151 0 # Node ID 9d931c8e9d9008b101672d57ffed0f20a5bde79c # Parent cc9fb95cede56d9b07df1c599a8550f31e8a4c49 The status_text variable is only used inside this block, so move it all up in there diff -r cc9fb95cede5 -r 9d931c8e9d90 libpurple/protocols/oscar/oscar.c --- 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 */