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

CUPS stops broadcasting after getting HUP signal when "BrowseAddress 192.168.1.255:631" is used #2618

Closed
michaelrsweet opened this issue Dec 3, 2007 · 2 comments

Comments

@michaelrsweet
Copy link
Collaborator

Version: 1.3.4
CUPS.org User: till.kamppeter

See following Ubuntu bug report:

https://bugs.launchpad.net/ubuntu/+source/cupsys/+bug/173470

If the CUPS broadcasting in cupsd.conf is configured to

BrowseAddress 192.168.1.255:631

(Broadcast address explicitly selected) then reloading the CUPS configuration via

killall -HUP cupsd

leads to the broadcasting (both CUPS protocol and DNS-SD) stopping with the error

E [03/Dec/2007:00:11:54 +0100] cupsdSendBrowseList: sendto failed for browser 1 - Bad file descriptor.

in error_log.

Restarting CUPS with

/etc/init.d/cups restart

and/or using

BrowseAddress @Local

or

BrowseAddress @if(eth0)

does not trigger this bug.

See also my comment in the Ubuntu bug report about reproducing this problem.

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

Fixed in Subversion repository.

The scheduler was trying to send browse packets before the browse socket was created.

@michaelrsweet
Copy link
Collaborator Author

"str2618.patch":

Index: scheduler/dirsvc.c

--- scheduler/dirsvc.c (revision 7108)
+++ scheduler/dirsvc.c (working copy)
@@ -202,7 +202,7 @@

  • Announce the deletion...
    */
  • if ((BrowseLocalProtocols & BROWSE_CUPS))
  • if ((BrowseLocalProtocols & BROWSE_CUPS) && BrowseSocket >= 0)
    {
    cups_ptype_t savedtype = p->type; /* Saved printer type */

@@ -866,7 +866,7 @@

p->browse_time = time(NULL);
  • if (BrowseLocalProtocols & BROWSE_CUPS)
  • if ((BrowseLocalProtocols & BROWSE_CUPS) && BrowseSocket >= 0)
    send_cups_browse(p);

#ifdef HAVE_LIBSLP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant