summaryrefslogtreecommitdiff
path: root/source3/printing/printing.c
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@samba.org>2012-08-28 18:58:24 +0200
committerDavid Disseldorp <ddiss@samba.org>2012-08-29 14:25:12 +0200
commitfb15e5a58f79801b0a74a8ddf555411c0fd44acb (patch)
tree6827666abb3e48641c9012adbde93def5a69743d /source3/printing/printing.c
parent24356f3cc9382b321939a53efec313ebce0acfa5 (diff)
downloadsamba-fb15e5a58f79801b0a74a8ddf555411c0fd44acb.tar.gz
s3-printing: fix bug 9123 lprng job tracking errors
The lprng printing back-end is truncating the print job filename in the lpq output, which means that Samba is not able to determine the back-end job ID for a newly submitted print job. Remove the unneeded spoolss job ID from the print job file name to ensure the job filename is not truncated. Also log these warnings at a higher log level. Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Wed Aug 29 14:25:13 CEST 2012 on sn-devel-104
Diffstat (limited to 'source3/printing/printing.c')
-rw-r--r--source3/printing/printing.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/printing/printing.c b/source3/printing/printing.c
index 9a7b1109258..23b143b4c62 100644
--- a/source3/printing/printing.c
+++ b/source3/printing/printing.c
@@ -2739,8 +2739,8 @@ static WERROR print_job_spool_file(int snum, uint32_t jobid,
}
slprintf(pjob->filename, sizeof(pjob->filename)-1,
- "%s/%s%.8u.XXXXXX", lp_pathname(talloc_tos(), snum),
- PRINT_SPOOL_PREFIX, (unsigned int)jobid);
+ "%s/%sXXXXXX", lp_pathname(talloc_tos(), snum),
+ PRINT_SPOOL_PREFIX);
pjob->fd = mkstemp(pjob->filename);
if (pjob->fd == -1) {