summaryrefslogtreecommitdiff
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
commitbbc16ef8da0bef525c5d5ba47b096f8771cfdb3b (patch)
treef8e53f120d24c5aa37d6294793940e4fed675d09
parenta3d897cfb3d8b66501a1ccedc78bd59782c11b14 (diff)
downloadsamba-bbc16ef8da0bef525c5d5ba47b096f8771cfdb3b.tar.gz
samba-bbc16ef8da0bef525c5d5ba47b096f8771cfdb3b.tar.bz2
samba-bbc16ef8da0bef525c5d5ba47b096f8771cfdb3b.zip
I found a better way of handling deleted auto printers
(This used to be commit f838707820175f97db82fc32f124c3b69b051e6b)
-rw-r--r--source3/param/loadparm.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 14da552dcb..97901cae8e 100644
--- a/source3/param/loadparm.c
+++ b/source3/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));
}