# HG changeset patch # User Richard Laager # Date 1149402870 0 # Node ID 5651cf120744ea71ae45de4501be88a8e70b6a99 # Parent c9ce13a3d9344b67b02568219b778bd817ff3096 [gaim-migrate @ 16213] SF Patch #1499284 from Ka-Hing Cheung "Set available message was broken some while ago (didn't bother to check the exact checkin), I think because of a misplaced else block. Attached is a patch that fixes the problem." committer: Tailor Script diff -r c9ce13a3d934 -r 5651cf120744 src/protocols/oscar/oscar.c --- a/src/protocols/oscar/oscar.c Sat Jun 03 16:47:58 2006 +0000 +++ b/src/protocols/oscar/oscar.c Sun Jun 04 06:34:30 2006 +0000 @@ -4370,7 +4370,7 @@ else if (primitive == GAIM_STATUS_AVAILABLE) { const char *status_html; - char *status_text; + char *status_text = NULL; status_html = gaim_status_get_attr_string(status, "message"); if (status_html != NULL) @@ -4382,15 +4382,11 @@ char *tmp = g_utf8_find_prev_char(status_text, &status_text[58]); strcpy(tmp, "..."); } - else - { - /* User did not specify an available message */ - status_text = NULL; - } - aim_srv_setstatusmsg(od, status_text); - g_free(status_text); } + aim_srv_setstatusmsg(od, status_text); + g_free(status_text); + /* This is needed for us to un-set any previous away message. */ away = g_strdup(""); }