libpurple/protocols/jabber/usertune.c

branch
soc.2007.xmpp
changeset 17802
eeefef7389a1
parent 17800
39a0f9ed0e26
child 17803
882abe4d932e
--- a/libpurple/protocols/jabber/usertune.c	Mon Jun 18 12:48:16 2007 +0000
+++ b/libpurple/protocols/jabber/usertune.c	Mon Jun 18 13:54:26 2007 +0000
@@ -33,6 +33,8 @@
 	JabberBuddy *buddy = jabber_buddy_find(js, from, FALSE);
 	xmlnode *tuneinfo, *tune;
 	PurpleJabberTuneInfo tuneinfodata;
+	JabberBuddyResource *resource;
+	const char *status_id;
 	
 	/* ignore the tune of people not on our buddy list */
 	if (!buddy || !item)
@@ -74,8 +76,8 @@
 			}
 		}
 	}
-	JabberBuddyResource *resource = jabber_buddy_find_resource(buddy, NULL);
-	const char *status_id = jabber_buddy_state_get_status_id(resource->state);
+	resource = jabber_buddy_find_resource(buddy, NULL);
+	status_id = jabber_buddy_state_get_status_id(resource->state);
 
 	purple_prpl_got_user_status(js->gc->account, from, status_id, PURPLE_TUNE_ARTIST, tuneinfodata.artist, PURPLE_TUNE_TITLE, tuneinfodata.title, PURPLE_TUNE_ALBUM, tuneinfodata.album, PURPLE_TUNE_TRACK, tuneinfodata.track, PURPLE_TUNE_TIME, tuneinfodata.time, PURPLE_TUNE_URL, tuneinfodata.url, NULL);
 }

mercurial