summaryrefslogtreecommitdiff
path: root/source3/printing
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2011-08-17 16:17:10 -0400
committerSimo Sorce <idra@samba.org>2011-08-21 09:05:06 -0400
commitfeadd849ba6e36896cf38cada170ff53c4b03258 (patch)
tree8b1db5568970b0e6fd113a33c83991a46498c1a1 /source3/printing
parentcce8c72eb141c8f279003f526de3dc02abc98d43 (diff)
downloadsamba-feadd849ba6e36896cf38cada170ff53c4b03258.tar.gz
samba-feadd849ba6e36896cf38cada170ff53c4b03258.tar.bz2
samba-feadd849ba6e36896cf38cada170ff53c4b03258.zip
s3-spoolssd: Listen on parent messages
Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
Diffstat (limited to 'source3/printing')
-rw-r--r--source3/printing/spoolssd.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/source3/printing/spoolssd.c b/source3/printing/spoolssd.c
index b833529f8f..9a806f09a8 100644
--- a/source3/printing/spoolssd.c
+++ b/source3/printing/spoolssd.c
@@ -280,6 +280,22 @@ static bool spoolss_setup_chld_hup_handler(struct tevent_context *ev_ctx,
return true;
}
+static void parent_ping(struct messaging_context *msg_ctx,
+ void *private_data,
+ uint32_t msg_type,
+ struct server_id server_id,
+ DATA_BLOB *data)
+{
+
+ /* The fact we received this message is enough to let make the event
+ * loop if it was idle. spoolss_children_main will cycle through
+ * spoolss_next_client at least once. That function will take whatever
+ * action is necessary */
+
+ DEBUG(10, ("Got message that the parent changed status.\n"));
+ return;
+}
+
static bool spoolss_child_init(struct tevent_context *ev_ctx,
int child_id, struct pf_worker_data *pf)
{
@@ -317,6 +333,8 @@ static bool spoolss_child_init(struct tevent_context *ev_ctx,
MSG_SMB_CONF_UPDATED, smb_conf_updated);
messaging_register(msg_ctx, ev_ctx, MSG_PRINTER_PCAP,
pcap_updated);
+ messaging_register(msg_ctx, ev_ctx,
+ MSG_PREFORK_PARENT_EVENT, parent_ping);
/* As soon as messaging is up check if pcap has been loaded already.
* If so then we probably missed a message and should load_printers()