Mercurial > pidgin
comparison libpurple/protocols/oscar/oscar.c @ 23366:98594354b423
Don't cycle through a NULL "message" when purple_parse_oncoming() is called
for an away oscar buddy. purple_got_infoblock() will supply a message as
appropriate.
author | Evan Schoenberg <evan.s@dreskin.net> |
---|---|
date | Sat, 14 Jun 2008 19:12:47 +0000 |
parents | fa904782a934 |
children | 31fa01597dce |
comparison
equal
deleted
inserted
replaced
23365:ef4dbd2bb696 | 23366:98594354b423 |
---|---|
1975 g_free(message); | 1975 g_free(message); |
1976 g_free(itmsurl); | 1976 g_free(itmsurl); |
1977 } | 1977 } |
1978 else | 1978 else |
1979 { | 1979 { |
1980 purple_prpl_got_user_status(account, info->sn, status_id, NULL); | 1980 PurpleBuddy *b = purple_find_buddy(account, info->sn); |
1981 PurplePresence *presence = purple_buddy_get_presence(b); | |
1982 PurpleStatus *old_status = purple_presence_get_active_status(presence); | |
1983 PurpleStatus *new_status = purple_presence_get_status(presence, status_id); | |
1984 | |
1985 /* If our status_id would change with this update, pass it to the core. | |
1986 * However, if our status_id would not change, do nothing; as we would clear out any existing | |
1987 * attributes on the status prematurely. purple_got_infoblock() will update the message as needed. | |
1988 */ | |
1989 if (old_status != new_status) | |
1990 purple_prpl_got_user_status(account, info->sn, status_id, NULL); | |
1981 } | 1991 } |
1982 | 1992 |
1983 /* Login time stuff */ | 1993 /* Login time stuff */ |
1984 if (info->present & AIM_USERINFO_PRESENT_ONLINESINCE) | 1994 if (info->present & AIM_USERINFO_PRESENT_ONLINESINCE) |
1985 signon = info->onlinesince; | 1995 signon = info->onlinesince; |