summaryrefslogtreecommitdiff
path: root/source3/web
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@suse.de>2010-12-19 19:52:08 +0100
committerJeremy Allison <jra@samba.org>2011-01-07 15:37:39 -0800
commit04248c2cfaa5a1728ef58fc8ca231fd1309ca694 (patch)
tree81e3be76291d3fdbf5f1e29869c6ef82f7305193 /source3/web
parent3a14c97459ea21f4a3ecefabfd676cb9839a162f (diff)
downloadsamba-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/web')
-rw-r--r--source3/web/swat.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/web/swat.c b/source3/web/swat.c
index bb3f3f974c..1cbecd4675 100644
--- a/source3/web/swat.c
+++ b/source3/web/swat.c
@@ -491,7 +491,8 @@ static int save_reload(int snum)
return 0;
}
iNumNonAutoPrintServices = lp_numservices();
- load_printers(server_event_context(), server_messaging_context());
+ pcap_cache_reload(server_event_context(), server_messaging_context(),
+ &load_printers);
return 1;
}
@@ -1435,7 +1436,8 @@ const char *lang_msg_rotate(TALLOC_CTX *ctx, const char *msgid)
reopen_logs();
load_interfaces();
iNumNonAutoPrintServices = lp_numservices();
- load_printers(server_event_context(), server_messaging_context());
+ pcap_cache_reload(server_event_context(), server_messaging_context(),
+ &load_printers);
cgi_setup(get_dyn_SWATDIR(), !demo_mode);