diff options
author | Gerald Carter <jerry@samba.org> | 2004-04-15 20:40:26 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:51:15 -0500 |
commit | 578a7d254fa857a9cd109f27efe1071c0afc37c5 (patch) | |
tree | c002e807a7a36ad20a4ace4df10e502d336323df /source3/printing | |
parent | 5b6286b26bd9543491623451d694ff4b225c2101 (diff) | |
download | samba-578a7d254fa857a9cd109f27efe1071c0afc37c5.tar.gz samba-578a7d254fa857a9cd109f27efe1071c0afc37c5.tar.bz2 samba-578a7d254fa857a9cd109f27efe1071c0afc37c5.zip |
r242: adding 'cups options' parameter to allow raw printing without changing /etc/cups/cupsd.conf -- documentation to follow
(This used to be commit 2f323b0991c37022fb59ef8c69454eff03296662)
Diffstat (limited to 'source3/printing')
-rw-r--r-- | source3/printing/print_cups.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/source3/printing/print_cups.c b/source3/printing/print_cups.c index f0096a17c2..9a48296543 100644 --- a/source3/printing/print_cups.c +++ b/source3/printing/print_cups.c @@ -683,6 +683,8 @@ cups_job_submit(int snum, struct printjob *pjob) char uri[HTTP_MAX_URI]; /* printer-uri attribute */ char *clientname; /* hostname of client for job-originating-host attribute */ pstring new_jobname; + int num_options = 0; + cups_option_t *options; DEBUG(5,("cups_job_submit(%d, %p (%d))\n", snum, pjob, pjob->sysjob)); @@ -751,6 +753,17 @@ cups_job_submit(int snum, struct printjob *pjob) ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "job-name", NULL, new_jobname); + /* + * add any options defined in smb.conf + */ + + num_options = 0; + options = NULL; + num_options = cupsParseOptions(lp_cups_options(snum), num_options, &options); + + if ( num_options ) + cupsEncodeOptions(request, num_options, options); + /* * Do the request and get back a response... */ @@ -782,7 +795,6 @@ cups_job_submit(int snum, struct printjob *pjob) return (ret); } - /* * 'cups_queue_get()' - Get all the jobs in the print queue. */ |