diff options
author | Simo Sorce <idra@samba.org> | 2011-08-04 08:56:01 -0400 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2011-08-10 18:14:05 +0200 |
commit | 0de09289ae20040c7c535f18ed7146b1513c5b7d (patch) | |
tree | 647b3a67b5bafce7bf8ca2ddc8b0ace75b9ac48b /source3/smbd | |
parent | 227551a07bc1af29ff2e24d889ea7dd45d575773 (diff) | |
download | samba-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/smbd')
-rw-r--r-- | source3/smbd/process.c | 2 | ||||
-rw-r--r-- | source3/smbd/server.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c index d96d5fb7e0..f542dcd84f 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -887,7 +887,7 @@ static void smbd_sig_hup_handler(struct tevent_context *ev, DEBUG(1,("Reloading services after SIGHUP\n")); reload_services(msg_ctx, smbd_server_conn->sock, False); if (am_parent) { - printing_subsystem_update(ev, msg_ctx); + printing_subsystem_update(ev, msg_ctx, true); } } diff --git a/source3/smbd/server.c b/source3/smbd/server.c index ee406fdfaf..24d61483e2 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -64,7 +64,7 @@ static void smb_conf_updated(struct messaging_context *msg, change_to_root_user(); reload_services(msg, smbd_server_conn->sock, False); if (am_parent) { - printing_subsystem_update(ev_ctx, msg); + printing_subsystem_update(ev_ctx, msg, false); } } @@ -1260,6 +1260,10 @@ extern void build_options(bool screen); if (!open_sockets_smbd(parent, ev_ctx, msg_ctx, ports)) exit_server("open_sockets_smbd() failed"); + /* force a printer update now that all messaging has been set up, + * before we allow clients to start connecting */ + printing_subsystem_update(ev_ctx, msg_ctx, true); + TALLOC_FREE(frame); /* make sure we always have a valid stackframe */ frame = talloc_stackframe(); |