aboutsummaryrefslogtreecommitdiffstats
path: root/protocols
diff options
context:
space:
mode:
authordequis <dx@dxzone.com.ar>2017-05-07 16:06:29 -0300
committerdequis <dx@dxzone.com.ar>2017-05-07 16:06:29 -0300
commiteb73d05e00156afd5ea6d7819d0d7ef2ccadedde (patch)
treee8d90dbcb653a6bf1c6aa6c239567b9e71a4fda1 /protocols
parent17a58dfa0049ebb77d2e48672322eff8bcd0c23d (diff)
Fix status message being set to null accidentally
In other words, "account jabber set away Message" resulted in away status being set, but not "Message". Fixes trac ticket 1291 This was broken by ac68733ad7a5127395d6367b655a2d9de5d911b5 (3.4.2) That commit added another call of imc_away_state_find() with the fixed string "away", so purple protocols can become away by setting away to any string. But by doing so, it wiped the status message because it's the same as the name of the away state.
Diffstat (limited to 'protocols')
-rw-r--r--protocols/nogaim.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/protocols/nogaim.c b/protocols/nogaim.c
index 3fed2728..58f74f8b 100644
--- a/protocols/nogaim.c
+++ b/protocols/nogaim.c
@@ -767,7 +767,7 @@ int imc_away_send_update(struct im_connection *ic)
}
msg = ic->acc->flags & ACC_FLAG_AWAY_MESSAGE ? away : NULL;
away = imc_away_state_find(m, away, &msg) ? :
- (imc_away_state_find(m, "away", &msg) ? : m->data);
+ (imc_away_state_find(m, "away", NULL) ? : m->data);
} else if (ic->acc->flags & ACC_FLAG_STATUS_MESSAGE) {
away = NULL;
msg = set_getstr(&ic->acc->set, "status") ?
@@ -801,7 +801,7 @@ static char *imc_away_state_find(GList *gcm, char *away, char **message)
/* At least the Yahoo! module works better if message
contains no data unless it adds something to what
we have in state already. */
- if (strlen(m->data) == strlen(away)) {
+ if (message && strlen(m->data) == strlen(away)) {
*message = NULL;
}
@@ -827,7 +827,7 @@ static char *imc_away_state_find(GList *gcm, char *away, char **message)
for (j = 0; imc_away_alias_list[i][j]; j++) {
for (m = gcm; m; m = m->next) {
if (g_strcasecmp(imc_away_alias_list[i][j], m->data) == 0) {
- if (!keep_message) {
+ if (!keep_message && message) {
*message = NULL;
}