# HG changeset patch # User Sadrul Habib Chowdhury # Date 1196055577 0 # Node ID 6636546aeacf3419fa7d958ef22cafdc9f28eb68 # Parent 495f2f1de9982e1298b3e79c180f25c3a49148a5 We need to work with the exclusive status. diff -r 495f2f1de998 -r 6636546aeacf libpurple/protocols/jabber/presence.c --- a/libpurple/protocols/jabber/presence.c Mon Nov 26 05:36:09 2007 +0000 +++ b/libpurple/protocols/jabber/presence.c Mon Nov 26 05:39:37 2007 +0000 @@ -99,8 +99,6 @@ { PurpleConnection *gc = NULL; JabberStream *js = NULL; - gboolean disconnected; - int primitive; xmlnode *presence, *x, *photo; char *stripped = NULL; JabberBuddyState state; @@ -108,22 +106,26 @@ const char *artist = NULL, *title = NULL, *source = NULL, *uri = NULL, *track = NULL; int length = -1; gboolean allowBuzz; - PurplePresence *p = purple_account_get_presence(account); + PurplePresence *p; PurpleStatus *tune; + if (purple_account_is_disconnected(account)) + return; + + p = purple_account_get_presence(account); if (NULL == status) { status = purple_presence_get_active_status(p); } - if(!purple_status_is_active(status)) - return; - - disconnected = purple_account_is_disconnected(account); - - if(disconnected) - return; - - primitive = purple_status_type_get_primitive(purple_status_get_type(status)); + if (purple_status_is_exclusive(status)) { + /* An exclusive status can't be deactivated. You should just + * activate some other exclusive status. */ + if (!purple_status_is_active(status)) + return; + } else { + /* Work with the exclusive status. */ + status = purple_presence_get_active_status(p); + } gc = purple_account_get_connection(account); js = gc->proto_data;