s3-spoolssd: Remove stale printers only on a valid pcap update.
authorAndreas Schneider <asn@samba.org>
Thu, 1 Sep 2011 12:25:07 +0000 (14:25 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 5 Sep 2011 09:18:23 +0000 (11:18 +0200)
load_printers() removes stale printers and we should only remove them if
we have a CUPS connection and talked to cups. Else we will remove every
configured printer if cups is not available.

Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Mon Sep  5 11:18:23 CEST 2011 on sn-devel-104

source3/printing/spoolssd.c

index 56b283ccdd7d4f1390e42895baa76721dbe2cc44..63b3f80cffedaba45995e68f5bb6f8b5c3ca21bd 100644 (file)
@@ -103,7 +103,7 @@ static void update_conf(struct tevent_context *ev,
 {
        change_to_root_user();
        lp_load(get_dyn_CONFIGFILE(), true, false, false, true);
-       reload_printers(ev, msg);
+       load_printers(ev, msg);
 
        spoolss_reopen_logs(spoolss_child_id);
        if (spoolss_child_id == 0) {
@@ -237,7 +237,7 @@ static void spoolss_chld_sig_hup_handler(struct tevent_context *ev,
 
        change_to_root_user();
        DEBUG(1,("Reloading printers after SIGHUP\n"));
-       reload_printers(ev, msg_ctx);
+       load_printers(ev, msg_ctx);
        spoolss_reopen_logs(spoolss_child_id);
 }