summaryrefslogtreecommitdiffstats
path: root/source/param
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2000-05-10 11:48:30 +0000
committerAndrew Tridgell <tridge@samba.org>2000-05-10 11:48:30 +0000
commitf838707820175f97db82fc32f124c3b69b051e6b (patch)
treef40f0e70badcd22e37c2b10da103d66095120e4a /source/param
parent3e710f660253fe6fa5c0ed7435ec66a2ed908b28 (diff)
downloadsamba-f838707820175f97db82fc32f124c3b69b051e6b.tar.gz
samba-f838707820175f97db82fc32f124c3b69b051e6b.tar.xz
samba-f838707820175f97db82fc32f124c3b69b051e6b.zip
I found a better way of handling deleted auto printers
Diffstat (limited to 'source/param')
-rw-r--r--source/param/loadparm.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/source/param/loadparm.c b/source/param/loadparm.c
index 14da552dcb0..97901cae8e8 100644
--- a/source/param/loadparm.c
+++ b/source/param/loadparm.c
@@ -1423,6 +1423,7 @@ FN_LOCAL_STRING(lp_dfsmap,szDfsMap)
FN_LOCAL_BOOL(lp_dfsmap_loaded,bDfsMapLoaded)
#endif
+FN_LOCAL_BOOL(lp_autoloaded,autoloaded)
FN_LOCAL_BOOL(lp_preexec_close,bPreexecClose)
FN_LOCAL_BOOL(lp_rootpreexec_close,bRootpreexecClose)
FN_LOCAL_BOOL(lp_revalidate,bRevalidate)
@@ -2802,21 +2803,9 @@ void lp_killunused(BOOL (*snumused)(int ))
{
int i;
for (i=0;i<iNumServices;i++) {
- BOOL killthisone;
-
if (!VALID(i)) continue;
- killthisone = (!snumused || !snumused(i));
-
- /* we also want to remove autoloaded printers that are no longer
- in /etc/printcap */
- if (!killthisone &&
- iSERVICE(i).autoloaded && iSERVICE(i).bPrint_ok &&
- !pcap_printername_ok(iSERVICE(i).szPrintername, NULL)) {
- killthisone = True;
- }
-
- if (killthisone) {
+ if (!snumused || !snumused(i)) {
iSERVICE(i).valid = False;
free_service(pSERVICE(i));
}