The Samba-Bugzilla – Attachment 5532 Details for
Bug 7288
SMB job IDs in CUPS job names wrong
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch that takes the job ID from the spool file name
fix-cups-jobids.patch (text/plain), 1.62 KB, created by
Michael Karcher
on 2010-03-24 10:13:10 UTC
(
hide
)
Description:
Patch that takes the job ID from the spool file name
Filename:
MIME Type:
Creator:
Michael Karcher
Created:
2010-03-24 10:13:10 UTC
Size:
1.62 KB
patch
obsolete
>Index: samba-3.2.5/source/printing/print_cups.c >=================================================================== >--- samba-3.2.5.orig/source/printing/print_cups.c 2010-03-24 11:31:40.970358032 +0100 >+++ samba-3.2.5/source/printing/print_cups.c 2010-03-24 11:39:14.280827274 +0100 >@@ -565,6 +565,7 @@ > cups_lang_t *language = NULL; /* Default language */ > char uri[HTTP_MAX_URI]; /* printer-uri attribute */ > const char *clientname = NULL; /* hostname of client for job-originating-host attribute */ >+ const char *jobid_in_file = NULL; > char *new_jobname = NULL; > int num_options = 0; > cups_option_t *options = NULL; >@@ -628,8 +629,16 @@ > "job-originating-host-name", NULL, > clientname); > >- if (asprintf(&new_jobname,"%s%.8u %s", PRINT_SPOOL_PREFIX, >- (unsigned int)pjob->smbjob, pjob->jobname) < 0) { >+ jobid_in_file = strstr(pjob->filename,"/" PRINT_SPOOL_PREFIX); >+ if (!jobid_in_file) { >+ DEBUG(0, ("Internal error: can't find job ID in %s\n", >+ pjob->filename)); >+ jobid_in_file = "00000000"; >+ } >+ else >+ jobid_in_file += 1 + strlen(PRINT_SPOOL_PREFIX); >+ if (asprintf(&new_jobname,"%s%.8s %s", PRINT_SPOOL_PREFIX, >+ jobid_in_file, pjob->jobname) < 0) { > goto out; > } > >Index: samba-3.2.5/source/printing/printing.c >=================================================================== >--- samba-3.2.5.orig/source/printing/printing.c 2010-03-24 11:31:41.042366033 +0100 >+++ samba-3.2.5/source/printing/printing.c 2010-03-24 11:35:29.735804325 +0100 >@@ -2561,8 +2561,6 @@ > return True; > } > >- pjob->smbjob = jobid; >- > ret = (*(current_printif->job_submit))(snum, pjob); > > if (ret)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 7288
:
5532
|
5546
|
5547
|
5548
|
5549