diff options
author | David Disseldorp <ddiss@suse.de> | 2010-12-19 19:52:08 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2011-01-07 15:37:39 -0800 |
commit | 04248c2cfaa5a1728ef58fc8ca231fd1309ca694 (patch) | |
tree | 81e3be76291d3fdbf5f1e29869c6ef82f7305193 /source3/printing/load.c | |
parent | 3a14c97459ea21f4a3ecefabfd676cb9839a162f (diff) | |
download | samba-04248c2cfaa5a1728ef58fc8ca231fd1309ca694.tar.gz samba-04248c2cfaa5a1728ef58fc8ca231fd1309ca694.tar.bz2 samba-04248c2cfaa5a1728ef58fc8ca231fd1309ca694.zip |
s3-printing: reload shares after pcap cache fill
Since commit eada8f8a, updates to the cups pcap cache are performed
asynchronously - cups_cache_reload() forks a child process to request
cups printer information and notify the parent smbd on completion.
Currently printer shares are reloaded immediately following the call to
cups_cache_reload(), this occurs prior to smbd receiving new cups pcap
information from the child process. Such behaviour can result in stale
print shares as outlined in bug 7836.
This fix ensures print shares are only reloaded after new pcap data has
been received.
Pair-Programmed-With: Lars Müller <lars@samba.org>
Diffstat (limited to 'source3/printing/load.c')
-rw-r--r-- | source3/printing/load.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source3/printing/load.c b/source3/printing/load.c index 4f1bb88a99..66c3ffd22c 100644 --- a/source3/printing/load.c +++ b/source3/printing/load.c @@ -54,14 +54,12 @@ static void add_auto_printers(void) } /*************************************************************************** -load automatic printer services +load automatic printer services from pre-populated pcap cache ***************************************************************************/ void load_printers(struct tevent_context *ev, struct messaging_context *msg_ctx) { - if (!pcap_cache_loaded()) { - pcap_cache_reload(ev, msg_ctx); - } + SMB_ASSERT(pcap_cache_loaded()); add_auto_printers(); |