summaryrefslogtreecommitdiff
path: root/source3/printing/pcap.h
AgeCommit message (Collapse)AuthorFilesLines
2021-12-10s3:printing: Move pcap_cache_loaded() to load.cVolker Lendecke1-1/+0
A future patch will remove the PRINTING dependency from smbd, but in delete_and_reload_printers() we still reference it. Maybe at some later stage we can remove reload_printers() overall, we don't really need to load the full printer list into every smbd. All we need is to load them on-demand for explicit listing functions, but there we can throw them away again. And when someone connects to the printer, we can also load them on demand. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2021-03-16printing: Remove simple wrapper function pcap_printer_read_fn()Volker Lendecke1-1/+0
There's only one caller that was trivial to convert Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2014-08-08printing: return last change time with pcap_cache_loaded()David Disseldorp1-1/+1
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10652 Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2014-08-08printing: remove pcap_cache_add()David Disseldorp1-1/+0
All print list updates are now done via pcap_cache_replace(), which can call into the print_list code directly. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10652 Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2014-08-08printing: reload printer_list.tdb from in memory listDavid Disseldorp1-4/+4
This will allow in future for a single atomic printer_list.tdb update. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10652 Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2014-08-08printing: traverse_read the printer list for share updatesDavid Disseldorp1-1/+1
The printcap update procedure involves the background printer process obtaining the printcap information from the printing backend, writing this to printer_list.tdb, and then notifying all smbd processes of the new list. The processes then all attempt to simultaneously traverse printer_list.tdb, in order to update their local share lists. With a large number of printers, and a large number of per-client smbd processes, this traversal results in significant lock contention, mostly due to the fact that the traversal is unnecessarily done with an exclusive (write) lock on the printer_list.tdb database. This commit changes the share update code path to perform a read-only traversal. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10652 Reported-by: Alex K <korobkin+samba@gmail.com> Reported-by: Franz Pförtsch <franz.pfoertsch@brose.com> Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2011-06-10source3/printing/pcap.h: fix licence/copyrightGünther Deschner1-0/+15
Guenther
2011-05-16s3-printing: remove cups_pull_comment_location from header fileDavid Disseldorp1-4/+0
Signed-off-by: Günther Deschner <gd@samba.org> Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Mon May 16 16:03:57 CEST 2011 on sn-devel-104
2011-05-16s3-printing: Get the location info from cups.Günther Deschner1-4/+4
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-22s3-printing: fix pcacp prototypes and includes.Günther Deschner1-0/+6
Guenther
2011-01-07s3-printing: remove old entries in pcap_cache_replaceDavid Disseldorp1-1/+1
Callers of pcap_cache_replace() assume the existing printcap cache is replaced by the new values provided. This is not currently the case, old entries should be removed.
2011-01-07s3-printing: reload shares after pcap cache fillDavid Disseldorp1-1/+3
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>
2010-08-08s3: Remove the smbd_messaging_context from cups_cache_reloadVolker Lendecke1-1/+2
2010-05-14Make pcap headers privateSimo Sorce1-0/+52
Signed-off-by: Günther Deschner <gd@samba.org>