Fix bug #7288 - SMB job IDs in CUPS job names wrong.
commit807b1a463198ea94e09e17f25cafa2de1ef8af10
authorJeremy Allison <jra@samba.org>
Fri, 26 Mar 2010 01:22:16 +0000 (25 18:22 -0700)
committerKarolin Seeger <kseeger@samba.org>
Thu, 6 May 2010 12:08:38 +0000 (6 14:08 +0200)
tree593bc95a61cdd4af013bbafd68084e3e239908d9
parent9e1cfde589a79fb72cc96e62e494fd80485d758d
Fix bug #7288 - SMB job IDs in CUPS job names wrong.

Based on a patch from Michael Karcher <samba@mkarcher.dialup.fu-berlin.de>.

I think this is the correct fix. It causes cups_job_submit to use
print_parse_jobid(), which I've moved into printing/lpq_parse.c (to allow the
link to work).

It turns out the old print_parse_jobid() was *broken*, in that the pjob
filename was set as an absolute path - not relative to the sharename (due to it
not going through the VFS calls).

This meant that the original code doing a strncmp on the first part of the
filename would always fail - it starts with a "/", not the relative pathname of
PRINT_SPOOL_PREFIX ("smbprn.").

This fix could fix some other mysterious printing bugs - probably the ones
Guenther noticed where job control fails on non-cups backends.

Contains c79ca41baf15b4ef7eb287d343b17a53ba41e852 and
92332fb2368c641db1552d1f2a2f7b3deaa11519 from master.

Jeremy.
(cherry picked from commit 12936bfeb36ae867b52fe48d0f6d3d17d5c8b110)
(cherry picked from commit 302e9b1c027ff3bddbdeb16f97aa6159311e439d)
source3/include/proto.h
source3/printing/lpq_parse.c
source3/printing/print_cups.c
source3/printing/printing.c