summaryrefslogtreecommitdiffstats
path: root/source3/printing
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-11-25 19:16:35 +0000
committerGerald Carter <jerry@samba.org>2003-11-25 19:16:35 +0000
commit055750f090874d6b355c26de94a1fbd18955d4c9 (patch)
treeb1a39501fa100f76d34778c940e7c742f080913f /source3/printing
parent6ce882ef292b1e785b8b859b48256da11091c0d1 (diff)
downloadsamba-055750f090874d6b355c26de94a1fbd18955d4c9.tar.gz
samba-055750f090874d6b355c26de94a1fbd18955d4c9.tar.xz
samba-055750f090874d6b355c26de94a1fbd18955d4c9.zip
allow users to delete jobs with cups printing backend
The changes the name of the job passed off to cups from "Test Page" to "smbprn.00000033 Test Page" so that we can get the smb jobid back from lpq. Working on bug 770. (This used to be commit 5979f4d645e84fb22223e6cbf0043f2fa21acb2f)
Diffstat (limited to 'source3/printing')
-rw-r--r--source3/printing/print_cups.c6
-rw-r--r--source3/printing/printing.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/source3/printing/print_cups.c b/source3/printing/print_cups.c
index df621537984..f0096a17c2c 100644
--- a/source3/printing/print_cups.c
+++ b/source3/printing/print_cups.c
@@ -682,6 +682,7 @@ cups_job_submit(int snum, struct printjob *pjob)
cups_lang_t *language; /* Default language */
char uri[HTTP_MAX_URI]; /* printer-uri attribute */
char *clientname; /* hostname of client for job-originating-host attribute */
+ pstring new_jobname;
DEBUG(5,("cups_job_submit(%d, %p (%d))\n", snum, pjob, pjob->sysjob));
@@ -744,8 +745,11 @@ cups_job_submit(int snum, struct printjob *pjob)
"job-originating-host-name", NULL,
clientname);
+ pstr_sprintf(new_jobname,"%s%.8u %s", PRINT_SPOOL_PREFIX,
+ (unsigned int)pjob->smbjob, pjob->jobname);
+
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "job-name", NULL,
- pjob->jobname);
+ new_jobname);
/*
* Do the request and get back a response...
diff --git a/source3/printing/printing.c b/source3/printing/printing.c
index ad17213c2d6..32470fb22f1 100644
--- a/source3/printing/printing.c
+++ b/source3/printing/printing.c
@@ -2063,6 +2063,8 @@ BOOL print_job_end(int snum, uint32 jobid, BOOL normal_close)
return True;
}
+ pjob->smbjob = jobid;
+
ret = (*(current_printif->job_submit))(snum, pjob);
if (ret)