Mercurial > pidgin
comparison src/protocols/oscar/oscar.c @ 13800:5651cf120744
[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 <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sun, 04 Jun 2006 06:34:30 +0000 |
parents | e4a4983752a9 |
children | 6c3c8d0d389f |
comparison
equal
deleted
inserted
replaced
13799:c9ce13a3d934 | 13800:5651cf120744 |
---|---|
4368 /* Do nothing! */ | 4368 /* Do nothing! */ |
4369 } | 4369 } |
4370 else if (primitive == GAIM_STATUS_AVAILABLE) | 4370 else if (primitive == GAIM_STATUS_AVAILABLE) |
4371 { | 4371 { |
4372 const char *status_html; | 4372 const char *status_html; |
4373 char *status_text; | 4373 char *status_text = NULL; |
4374 | 4374 |
4375 status_html = gaim_status_get_attr_string(status, "message"); | 4375 status_html = gaim_status_get_attr_string(status, "message"); |
4376 if (status_html != NULL) | 4376 if (status_html != NULL) |
4377 { | 4377 { |
4378 status_text = gaim_markup_strip_html(status_html); | 4378 status_text = gaim_markup_strip_html(status_html); |
4380 if (strlen(status_text) > 60) | 4380 if (strlen(status_text) > 60) |
4381 { | 4381 { |
4382 char *tmp = g_utf8_find_prev_char(status_text, &status_text[58]); | 4382 char *tmp = g_utf8_find_prev_char(status_text, &status_text[58]); |
4383 strcpy(tmp, "..."); | 4383 strcpy(tmp, "..."); |
4384 } | 4384 } |
4385 else | 4385 } |
4386 { | 4386 |
4387 /* User did not specify an available message */ | 4387 aim_srv_setstatusmsg(od, status_text); |
4388 status_text = NULL; | 4388 g_free(status_text); |
4389 } | |
4390 aim_srv_setstatusmsg(od, status_text); | |
4391 g_free(status_text); | |
4392 } | |
4393 | 4389 |
4394 /* This is needed for us to un-set any previous away message. */ | 4390 /* This is needed for us to un-set any previous away message. */ |
4395 away = g_strdup(""); | 4391 away = g_strdup(""); |
4396 } | 4392 } |
4397 else if (primitive == GAIM_STATUS_AWAY) | 4393 else if (primitive == GAIM_STATUS_AWAY) |