Bug 8432 - Don't delete configured printers if cups isn't running
Summary: Don't delete configured printers if cups isn't running
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.6
Classification: Unclassified
Component: Printing (show other bugs)
Version: 3.6.0
Hardware: All All
: P5 normal
Target Milestone: ---
Assignee: printing-maintainers
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-31 19:01 UTC by Andreas Schneider
Modified: 2011-09-06 13:45 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schneider 2011-08-31 19:01:35 UTC
If you have a configured a printer and cups is for some reason not accessible the printer is deleted from the registry. This means a customer has to reconfigure the printer every time cups is not available for some reason.

We should not delete the configuration.

The quick fix in master is to remove line 83 in smbd/server_reload.c.

The question is how to do the cleanup. Maybe we should add a timestamp to printers and delete them after 2 weeks if they didn't show up.
Comment 1 Andreas Schneider 2011-09-01 12:36:05 UTC
I've looked at the code more closely. We did a lot of changes in that area. I think we got it correct. We call reload_printers() only after a successful pcap_cache_reload() and pcap_cache_reload() calls this function only on success. Which means that it was able to talk to the CUPS server.
Comment 2 Andreas Schneider 2011-09-06 13:45:00 UTC
There was just a bug in master's spoolssd.

I've tested 3.5.10 and 3.6.0 and it is working correctly.