Ticket #267 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

Bug fixes for cleanup code

Reported by: oc3an Owned by: lennart
Milestone: Avahi 0.6.26 Component: avahi-core
Keywords: Cc:

Description

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.

Thanks,

-Patrick

Attachments

fix-cleanup-bugs.patch Download (2.2 KB) - added by oc3an 4 years ago.
Patch

Change History

Changed 4 years ago by oc3an

Patch

follow-up: ↓ 3   Changed 4 years ago by lennart

Actually patches posted on the ML should be good enough. I took notice of that mail. But my inbox is hopelessly swamped. Sorry for that.

Form a first look the patch looks good to me. Thanks.

  Changed 4 years ago by lennart

  • milestone set to Avahi 0.6.26

in reply to: ↑ 1   Changed 4 years ago by oc3an

Replying to lennart:

Actually patches posted on the ML should be good enough. I took notice of that mail. But my inbox is hopelessly swamped. Sorry for that.

No problem! It took me a little while to track this down so I'd like to see it integrated :)

Let me know if there's anything I've overlooked. I'm (obviously) new to submitting patches to Avahi.

-Patrick

  Changed 4 years ago by lennart

  • status changed from new to closed
  • resolution set to fixed

Thanks. Applied!

Note: See TracTickets for help on using tickets.