changeset 20574:485a0bffe4f5

presence is an xmlnode here.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Fri, 21 Sep 2007 02:11:29 +0000
parents e2347dda167c
children 707cd521188a
files libpurple/protocols/jabber/presence.c
diffstat 1 files changed, 5 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/presence.c	Fri Sep 21 00:20:20 2007 +0000
+++ b/libpurple/protocols/jabber/presence.c	Fri Sep 21 02:11:29 2007 +0000
@@ -111,9 +111,8 @@
 	PurplePresence *p = purple_account_get_presence(account);
 	PurpleStatus *tune;
 
-	if(NULL == status) {
-		PurplePresence *gpresence = purple_account_get_presence(account);
-		status = purple_presence_get_active_status(gpresence);
+	if (NULL == status) {
+		status = purple_presence_get_active_status(p);
 	}
 
 	if(!purple_status_is_active(status))
@@ -148,8 +147,8 @@
 		js->old_priority != priority || CHANGED(js->old_avatarhash, js->avatar_hash)) {
 		js->allowBuzz = allowBuzz;
 
-		if (js->googletalk && stripped == NULL && purple_presence_is_status_primitive_active(presence, PURPLE_STATUS_TUNE)) {
-			tune = purple_presence_get_status(presence, "tune");
+		if (js->googletalk && stripped == NULL && purple_presence_is_status_primitive_active(p, PURPLE_STATUS_TUNE)) {
+			tune = purple_presence_get_status(p, "tune");
 			stripped = jabber_google_presence_outgoing(tune);
 		}
 
@@ -181,7 +180,7 @@
 	}
 					  	
 	/* next, check if there are any changes to the tune values */
-	tune = purple_presence_get_status(purple_status_get_presence(status), "tune");
+	tune = purple_presence_get_status(p, "tune");
 	if (tune && purple_status_is_active(tune)) {
 		artist = purple_status_get_attr_string(tune, PURPLE_TUNE_ARTIST);
 		title = purple_status_get_attr_string(tune, PURPLE_TUNE_TITLE);
@@ -743,7 +742,6 @@
 		}
 
 		if((found_jbr = jabber_buddy_find_resource(jb, NULL))) {
-			const char *message;
 			jabber_google_presence_incoming(js, buddy_name, found_jbr);
 			purple_prpl_got_user_status(js->gc->account, buddy_name, jabber_buddy_state_get_status_id(found_jbr->state), "priority", found_jbr->priority, "message", found_jbr->status, NULL);
 		} else {