Mercurial > pidgin.yaz
comparison libpurple/protocols/bonjour/mdns_avahi.c @ 27021:e40a30c883cc
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).
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sat, 23 May 2009 07:08:00 +0000 |
parents | 252e26edb7a9 |
children | deecc1d663c4 |
comparison
equal
deleted
inserted
replaced
27020:f2e4bc583e52 | 27021:e40a30c883cc |
---|---|
355 const void *rdata, size_t size, AvahiLookupResultFlags flags, void *userdata) { | 355 const void *rdata, size_t size, AvahiLookupResultFlags flags, void *userdata) { |
356 BonjourBuddy *buddy = userdata; | 356 BonjourBuddy *buddy = userdata; |
357 AvahiBuddyImplData *idata = buddy->mdns_impl_data; | 357 AvahiBuddyImplData *idata = buddy->mdns_impl_data; |
358 | 358 |
359 switch (event) { | 359 switch (event) { |
360 case AVAHI_BROWSER_CACHE_EXHAUSTED: | |
361 case AVAHI_BROWSER_ALL_FOR_NOW: | |
362 /* Ignore these "meta" informational events */ | |
363 return; | |
360 case AVAHI_BROWSER_NEW: | 364 case AVAHI_BROWSER_NEW: |
361 bonjour_buddy_got_buddy_icon(buddy, rdata, size); | 365 bonjour_buddy_got_buddy_icon(buddy, rdata, size); |
362 break; | 366 break; |
363 case AVAHI_BROWSER_REMOVE: | 367 case AVAHI_BROWSER_REMOVE: |
364 case AVAHI_BROWSER_CACHE_EXHAUSTED: | |
365 case AVAHI_BROWSER_ALL_FOR_NOW: | |
366 case AVAHI_BROWSER_FAILURE: | 368 case AVAHI_BROWSER_FAILURE: |
367 purple_debug_error("bonjour", "Error rerieving buddy icon record: %s\n", | 369 purple_debug_error("bonjour", "Error retrieving buddy icon record: %s\n", |
368 avahi_strerror(avahi_client_errno(avahi_record_browser_get_client(b)))); | 370 avahi_strerror(avahi_client_errno(avahi_record_browser_get_client(b)))); |
369 break; | 371 break; |
370 } | 372 } |
371 | 373 |
372 /* Stop listening */ | 374 /* Stop listening */ |