Ticket #267 (closed defect: fixed)
Bug fixes for cleanup code
|Reported by:||oc3an||Owned by:||lennart|
This was posted to the mailing list before I realised that trac was the right way to submit patches to avahi. Apologies.
Attached is a patch which fixes two issues in the avahi server.
1. is_duplicate_entry was matching against a dead entries. This causes problems where goodbyes are sometimes not sent because we (incorrectly) thought there was a duplicate entry.
2. avahi_s_entry_group_free and avahi_s_entry_group_reset now call avahi_cleanup_dead_entries because it can be a long time before the cleanup is triggered from a mcast_socket_event or legacy_unicast_socket_event. This causes excessive memory usage in some situations.
I have also removed the cleanup_dead function from avahi-core/server.c and replaced calls to it with avahi_cleanup_dead_entries as avahi_cleanup_dead_entries already calls avahi_browser_cleanup. The extra function call was redundant.