s3-printing: reload shares after pcap cache fill
authorDavid Disseldorp <ddiss@suse.de>
Sun, 19 Dec 2010 18:52:08 +0000 (19:52 +0100)
committerKarolin Seeger <kseeger@samba.org>
Sat, 5 Mar 2011 13:34:50 +0000 (14:34 +0100)
commit99772e1e3e6af29ec597369d3ae8ccdca257ae3a
treee86d205d55b2792f49a538e6e0d2100921e3e874
parent666e1fb9915b0b4304862fd737d64464076f6ba6
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>
(cherry picked from commit a8a01e4a3dcafd97372021d0d6f859fd3a69235f)
source3/include/proto.h
source3/printing/load.c
source3/printing/pcap.c
source3/printing/print_cups.c
source3/smbd/server.c
source3/web/swat.c