Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mdns-avahi] utilize Avahi events for complete result handling #2742

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

abtink
Copy link
Member

@abtink abtink commented Feb 27, 2025

This commit enhances Mdns::Publisher using Avahi to utilize the events AVAHI_BROWSER_ALL_FOR_NOW and CACHE_EXHAUSTED, which notify that all records have been processed and no further results are expected in the near future.

This improvement prevents premature "resolved" callbacks after receiving only the initial IPv6 address, thereby improving host and service address resolution. The Publisher now waits for these events to ensure it gathers all available addresses from the cache and query responses before signaling resolved callback.

Copy link

codecov bot commented Feb 27, 2025

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 42.11%. Comparing base (2b41187) to head (17e8459).
Report is 963 commits behind head on main.

Files with missing lines Patch % Lines
src/mdns/mdns_avahi.cpp 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2742       +/-   ##
===========================================
- Coverage   55.77%   42.11%   -13.66%     
===========================================
  Files          87      110       +23     
  Lines        6890    13391     +6501     
  Branches        0      954      +954     
===========================================
+ Hits         3843     5640     +1797     
- Misses       3047     7452     +4405     
- Partials        0      299      +299     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

This commit enhances `Mdns::Publisher` using Avahi to utilize the
events `AVAHI_BROWSER_ALL_FOR_NOW` , which notify that all records
have been processed and no further results are expected in the near
future.

This improvement prevents premature "resolved" callbacks after
receiving only the initial IPv6 address, thereby improving host and
service address resolution. The `Publisher` now waits for these
events to ensure it gathers all available addresses from the
cache and query responses before signaling resolved callback.
@abtink abtink force-pushed the avahi/event-multi-result branch from ba3a15b to 17e8459 Compare February 27, 2025 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant