pidgin: 0ef5f961: Correctly ignore Avahi's informational e...

qulogic at pidgin.im qulogic at pidgin.im
Sat May 23 03:20:32 EDT 2009


-----------------------------------------------------------------
Revision: 0ef5f961fe7993b5d80b2c8b067e18fa20bf0126
Ancestor: 24fa455ff976c0eedc134be0c68ba4ea8a167a31
Author: qulogic at pidgin.im
Date: 2009-05-23T07:08:00
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/0ef5f961fe7993b5d80b2c8b067e18fa20bf0126

Modified files:
        libpurple/protocols/bonjour/mdns_avahi.c

ChangeLog: 

Correctly ignore Avahi's informational events when querying records for the
buddy icon. This fixes missing icons with the cryptic "An unexpected D-Bus
error occured (sic)" (since it wasn't really an error).

-------------- next part --------------
============================================================
--- libpurple/protocols/bonjour/mdns_avahi.c	db17ca09d1710a5fca1a86f188898664d02c298d
+++ libpurple/protocols/bonjour/mdns_avahi.c	6a7d0b2a3d91743878de47253685773b72e74926
@@ -357,14 +357,16 @@ _buddy_icon_record_cb(AvahiRecordBrowser
 	AvahiBuddyImplData *idata = buddy->mdns_impl_data;
 
 	switch (event) {
+		case AVAHI_BROWSER_CACHE_EXHAUSTED:
+		case AVAHI_BROWSER_ALL_FOR_NOW:
+			/* Ignore these "meta" informational events */
+			return;
 		case AVAHI_BROWSER_NEW:
 			bonjour_buddy_got_buddy_icon(buddy, rdata, size);
 			break;
 		case AVAHI_BROWSER_REMOVE:
-		case AVAHI_BROWSER_CACHE_EXHAUSTED:
-		case AVAHI_BROWSER_ALL_FOR_NOW:
 		case AVAHI_BROWSER_FAILURE:
-			purple_debug_error("bonjour", "Error rerieving buddy icon record: %s\n",
+			purple_debug_error("bonjour", "Error retrieving buddy icon record: %s\n",
 				avahi_strerror(avahi_client_errno(avahi_record_browser_get_client(b))));
 			break;
 	}


More information about the Commits mailing list