summaryrefslogtreecommitdiff
path: root/source3/printing
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2011-08-10 09:27:24 -0400
committerAndreas Schneider <asn@samba.org>2011-08-10 18:14:06 +0200
commitc3cfa6be4769be15de4278a72b1c73c763edb21f (patch)
tree295a53f3562b5f911828e98a2a787599338cb089 /source3/printing
parent54aaa5a58c91df4054c3cbaa238c6a83bbfb2eb7 (diff)
downloadsamba-c3cfa6be4769be15de4278a72b1c73c763edb21f.tar.gz
samba-c3cfa6be4769be15de4278a72b1c73c763edb21f.tar.bz2
samba-c3cfa6be4769be15de4278a72b1c73c763edb21f.zip
s3-printing: Do not try to force reload.
Be more correct in load printers at startup. If async process have already started we do not need to force a reload, but we just need to load the printers. If other process have not finished initializing it makes no sense to try to force them as they are masking SIGHUP unitl init is done anyway. Signed-off-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/printing')
-rw-r--r--source3/printing/queue_process.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/printing/queue_process.c b/source3/printing/queue_process.c
index 20f1a5b06b..fd4f3c7285 100644
--- a/source3/printing/queue_process.c
+++ b/source3/printing/queue_process.c
@@ -30,6 +30,7 @@
#include "locking/proto.h"
#include "smbd/proto.h"
#include "rpc_server/rpc_service_setup.h"
+#include "printing/load.h"
extern pid_t start_spoolssd(struct event_context *ev_ctx,
struct messaging_context *msg_ctx);
@@ -357,6 +358,9 @@ void printing_subsystem_update(struct tevent_context *ev_ctx,
bool force)
{
if (background_lpq_updater_pid != -1) {
+ if (pcap_cache_loaded()) {
+ load_printers(ev_ctx, msg_ctx);
+ }
if (force) {
/* Send a sighup to the background process.
* this will force it to reload printers */
@@ -365,5 +369,5 @@ void printing_subsystem_update(struct tevent_context *ev_ctx,
return;
}
- pcap_cache_reload(ev_ctx, msg_ctx, &reload_pcap_change_notify);
+ pcap_cache_reload(ev_ctx, msg_ctx, &reload_printers);
}