cups lpd emulation: lpq, log flaws
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cupsys (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: cupsys
In cupsys-
1: When using lpq on a remote machine to query a cups printer, the following is reported, regardless of the status of the printer:
"lw is not ready" (where "lw" is the name of the printer).
2: When a print job is reported in /var/log/
an ascii 001, i.e. instead of:
lw jdd 2515 [31/Aug/
it shows:
lw jdd 2515 [31/Aug/
(where ^A is control-A, i.e. ascii character 001)
There is a straightforward source patch: simply replace cupsys-
I've appended a patch below.
Regards,
John
--
John DiMarco <email address hidden> Office: SF3302B
IT Director Phone: 416-978-5300
Department of Computer Science, University of Toronto Fax: 416-946-5464
http://
*** cups-lpd.c 2007/08/31 19:20:20 1.1
--- cups-lpd.c 2007/08/31 19:20:56
***************
*** 96,102 ****
static int print_file(http_t *http, int id, const char *filename,
! const char *docname, const char *user, int last);
static int recv_print_
static int remove_jobs(const char *name, const char *agent,
--- 96,103 ----
static int print_file(http_t *http, int id, const char *filename,
! const char *docname, const char *user,
! const char *format, int last);
static int recv_print_
static int remove_jobs(const char *name, const char *agent,
***************
*** 150,157 ****
num_defaults = 0;
defaults = NULL;
hostlookups = 1;
- num_defaults = cupsAddOption(
- num_defaults, &defaults);
for (i = 1; i < argc; i ++)
if (argv[i][0] == '-')
--- 151,156 ----
***************
*** 217,222 ****
--- 216,224 ----
}
+ num_defaults = cupsAddOption(
+ num_defaults, &defaults);
+
/*
* RFC1179 specifies that only 1 daemon command can be received for
* every connection.
***************
*** 471,477 ****
request = ippNewRequest(
! ippAddStrings(
--- 473,479 ----
request = ippNewRequest(
! ippAddStrings(
***************
*** 597,603 ****
ippAddStr
! ippAddStrings(
--- 599,605 ----
ippAddStr
! ippAddStrings(
***************
*** 648,654 ****
if (state)
{
if ((attr = ippFindAttribut
! IPP_TAG_INTEGER)) == NULL)
else
--- 650,656 ----
if (state)
{
if ((attr = ippFindAttribut
! IPP_TAG_ENUM)) == NULL)
else
***************
*** 823,828 ****
--- 825,831 ----
const char *filename, /* I - File to print */
const char *docname, /* I - document-name */
const char *user, /* I - requesting-
+ const char *format, /* I - document-format */
int last) /* I - 1 = last file in job */
{
ipp_t *request; /* IPP request */
***************
*** 845,850 ****
--- 848,857 ----
ippAddStr
+ if (format)
+ ippAddString(
+ "document-format", NULL, format);
+
if (last)
ippAddBoo
***************
*** 1277,1282 ****
--- 1284,1291 ----
if (print_file(http, id, temp[i], docname, user,
+ cupsGetOption(
+ options),
***************
*** 1387,1393 ****
return (1);
}
else
! syslog(LOG_INFO, "Job ID %d cancelled", id);
}
httpClose(
--- 1396,1402 ----
return (1);
}
else
! syslog(LOG_INFO, "Job ID %d canceled", id);
}
httpClose(
Thanks for reporting this bug and any supporting documentation. Since this bug has enough information provided for a developer to begin work, I'm going to mark it as confirmed and let them handle it from here.
Thank you for including the patch with this report.
Thanks for taking the time to make Ubuntu better!