-
Notifications
You must be signed in to change notification settings - Fork 453
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
When restarting avahi-daemon while CUPS is running, CUPS looses connection #4370
Labels
Milestone
Comments
CUPS.org User: mike Fixed in Subversion repository. |
"str4370.patch": Index: scheduler/dirsvc.c--- scheduler/dirsvc.c (revision 11597)
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version: 1.7.1
CUPS.org User: till.kamppeter
This is a follow-up to STR #4300
Original issue:
I use CUPS with shared printers and the shared printers are broadcasted by Avahi. This works well when avahi-daemon is started before cups and both keep running. But if I restart avahi-daemon while CUPS is running, CUPS looses connection to avahi-daemon and so stops broadcasting. What I expect is that CUPS reconnects after the restart of avahi-daemon. This can easily happen if for example the avahi-daemon package gets updated or the admin changes the configuration of avahi-daemon.
Suggestion for a solution:
While making cups-browsed runnable on-demand on mobile devices I have found a way to allow avahi-daemon to restart and reconnect. See the section
How to Write a Client That Can Deal with Daemon Restarts
on
http:https://avahi.sourcearchive.com/documentation/0.6.17/main.html
It is simply passing AVAHI_CLIENT_NO_FAIL to avahi_client_new(). With this I can run cups-browsed independent of avahi-daemon (not even important in which order avahi-daemon and cups-browsed are started), and whenever avahi-daemon is running, remote CUPS printers are detected and the appropriate local raw queues created and whenever avahi-daemon disappears, the local queues are taken down. The (re)connection with avahi-daemon (registering services in case of cupsd has to be done in the client callback function and so it happens automatically when avahi-daemon appears.
Perhaps one can use this also for cupsd.
The text was updated successfully, but these errors were encountered: