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

Fix cupsEnumDests to finish when receiving the ALL_FOR_NOW avahi event #4989

Closed

Commits on Apr 11, 2017

  1. Fix cupsEnumDests to finish when receiving the ALL_FOR_NOW avahi event

    cupsEnumDests listens for avahi answers for `msec` milliseconds (where
    `msec` is given as a parameter to cupsEnumDests). avahi sends an
    ALL_FOR_NOW event [1] when "more records will probably not show up in
    the near future". This means that from the reception of ALL_FOR_NOW
    to the timeout triggering, cupsEnumDests basically does nothing but
    block the caller. Also, since the caller can't know how long it will
    take cupsEnumDests to receive all information from avahi, this means
    developers are encouraged to use "big enough" values for `msec`,
    thus blocking their calling threads unnecessarily.
    
    This patch makes cupsEnumDests react to the ALL_FOR_NOW event and
    finish as soon as all avahi caches have been read and all static
    servers have been queried.
    
    No behavior is changed when HAVE_DNSSD is defined.
    
    [1] http://www.avahi.org/doxygen/html/defs_8h.html#af7ff3b95259b3441a282b87d82eebd87a430e1134047305e7b892e784cf72f815
    antlarr committed Apr 11, 2017
    Configuration menu
    Copy the full SHA
    36e587b View commit details
    Browse the repository at this point in the history