summaryrefslogtreecommitdiff
path: root/source3/printing/queue_process.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2011-08-04 08:56:01 -0400
committerAndreas Schneider <asn@samba.org>2011-08-10 18:14:05 +0200
commit0de09289ae20040c7c535f18ed7146b1513c5b7d (patch)
tree647b3a67b5bafce7bf8ca2ddc8b0ace75b9ac48b /source3/printing/queue_process.c
parent227551a07bc1af29ff2e24d889ea7dd45d575773 (diff)
downloadsamba-0de09289ae20040c7c535f18ed7146b1513c5b7d.tar.gz
samba-0de09289ae20040c7c535f18ed7146b1513c5b7d.tar.bz2
samba-0de09289ae20040c7c535f18ed7146b1513c5b7d.zip
s3-printing: Force pcap reload when all ready
This way we are sure the cache is primed properly and messages can be sent to processes if necessary as all messaging has been set up. Signed-off-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/printing/queue_process.c')
-rw-r--r--source3/printing/queue_process.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/printing/queue_process.c b/source3/printing/queue_process.c
index 5d18a08d63..82fd70d36d 100644
--- a/source3/printing/queue_process.c
+++ b/source3/printing/queue_process.c
@@ -295,9 +295,17 @@ bool printing_subsystem_init(struct tevent_context *ev_ctx,
}
void printing_subsystem_update(struct tevent_context *ev_ctx,
- struct messaging_context *msg_ctx)
+ struct messaging_context *msg_ctx,
+ bool force)
{
- if (background_lpq_updater_pid != -1) return;
+ if (background_lpq_updater_pid != -1) {
+ if (force) {
+ /* Send a sighup to the background process.
+ * this will force it to reload printers */
+ kill(background_lpq_updater_pid, SIGHUP);
+ }
+ return;
+ }
pcap_cache_reload(ev_ctx, msg_ctx, &reload_pcap_change_notify);
}