fix cups printcap reload where no printers are present

David Disseldorp ddiss at suse.de
Thu Dec 30 09:05:37 MST 2010


Hi,

cups_async_callback() is called to receive new printcap data from a
child process which requests the information from cupsd.

Newly received printcap information is stored in a temporary printcap
cache (tmp_pcap_cache). Once the child process closes the printcap IPC
file descriptor, the system printcap cache is replaced with the newly
populated tmp_pcap_cache, however this only occurs if tmp_pcap_cache is
non null (has at least one printer).

If the printcap cache is empty, which is the case when cups is not
exporting any printers, the printcap cache is not replaced resulting in
stale data.

These changes are based on top of bug 7836 commits. Reviews, comments
and feedback invited.

Cheers, David


The following changes since commit 42b4095003b0aafaaaccf0be522de1ec183747e3:

  s3-printing: remove printer_list_need_refresh (2010-12-29 14:21:25 +0100)

are available in the git repository at:
  git://oss.sgi.com/ddiss/samba cups_pcap_reload_no_printers

David Disseldorp (2):
      s3-printing: remove unneeded local_pcap_copy global
      s3-printing: fix cups pcap reload with no printers

 source3/printing/print_cups.c |   87 +++++++++++++++++++---------------------
 1 files changed, 41 insertions(+), 46 deletions(-)


More information about the samba-technical mailing list