diff libpurple/protocols/jabber/presence.c @ 18154:08e639dbac99

really and truly enforce the no-presence-before-roster thing
author Nathan Walp <nwalp@pidgin.im>
date Sun, 17 Jun 2007 05:14:45 +0000
parents ca965dfd3875
children 2a5c5d675789
line wrap: on
line diff
--- a/libpurple/protocols/jabber/presence.c	Sun Jun 17 05:10:35 2007 +0000
+++ b/libpurple/protocols/jabber/presence.c	Sun Jun 17 05:14:45 2007 +0000
@@ -120,6 +120,12 @@
 	gc = purple_account_get_connection(account);
 	js = gc->proto_data;
 
+	/* we don't want to send presence before we've gotten our roster */
+	if(!js->roster_parsed) {
+		purple_debug_info("jabber", "attempt to send presence before roster retrieved\n");
+		return;
+	}
+
 	purple_status_to_jabber(status, &state, &stripped, &priority);