diff options
author | Jeremy Allison <jra@samba.org> | 2010-03-25 17:36:47 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2010-03-25 17:36:47 -0700 |
commit | c79ca41baf15b4ef7eb287d343b17a53ba41e852 (patch) | |
tree | e11b760b6e6ad3532cf2629f85ede748ed40b208 /source3/printing/printing.c | |
parent | 2e00a8a74b7c5c95b61e6c7f365ed852c7d95289 (diff) | |
download | samba-c79ca41baf15b4ef7eb287d343b17a53ba41e852.tar.gz samba-c79ca41baf15b4ef7eb287d343b17a53ba41e852.tar.bz2 samba-c79ca41baf15b4ef7eb287d343b17a53ba41e852.zip |
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.
Guenther PLEASE CHECK !
Jeremy.
Diffstat (limited to 'source3/printing/printing.c')
-rw-r--r-- | source3/printing/printing.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/source3/printing/printing.c b/source3/printing/printing.c index e48a2d173c..7804997dfa 100644 --- a/source3/printing/printing.c +++ b/source3/printing/printing.c @@ -644,25 +644,6 @@ void pjob_delete(const char* sharename, uint32 jobid) } /**************************************************************************** - Parse a file name from the system spooler to generate a jobid. -****************************************************************************/ - -static uint32 print_parse_jobid(char *fname) -{ - int jobid; - - if (strncmp(fname,PRINT_SPOOL_PREFIX,strlen(PRINT_SPOOL_PREFIX)) != 0) - return (uint32)-1; - fname += strlen(PRINT_SPOOL_PREFIX); - - jobid = atoi(fname); - if (jobid <= 0) - return (uint32)-1; - - return (uint32)jobid; -} - -/**************************************************************************** List a unix job in the print database. ****************************************************************************/ |