notifier - Get-Job-Attributes client-error-bad-request

Rodger Devine rdevine at umich.edu
Tue Apr 13 14:05:57 PDT 2010


Greetings,

I¹ve proceeded to use the IPP_GET_JOB_ATTRIBUTES operation and job-uri 
(passed in the IPP request) with cupsDoRequest, but am encountering an 
error when making this call in a notifier context. To note, I *am* able 
to get this function to work in another utility I wrote modeled after 
the ³lpq -a jobid² command. However, with regards to the notifier, I¹m 
encountering errors when I make the following call:

....

if ((response = cupsDoRequest(http, ipp, "/")) != NULL) {

   if (response->request.status.status_code > IPP_OK_CONFLICT)
      {
        fprintf(stderr, "showjob: %s\n", cupsLastErrorString());
        ippDelete(response);
        return (0);
     }

....

using ippNew() with ipp->request.op.operation_id = IP_GET_JOB_ATTRIBUTES 
and ipp->request.op.request_id = 1
########################################################################
Apr 13 16:34:58 server cupsd[9912]: Get-Job-Attributes 
client-error-bad-request: Attribute groups are out of order (1 < 7)!

Apr 13 16:34:58 server cupsd[9912]: cupsdProcessIPPRequest: 9 
status_code=400 (client-error-bad-request)
########################################################################

using ippNewRequest(IPP_GET_JOB_ATTRIBUTES)
########################################################################
Apr 13 16:41:05 server cupsd[11435]: unknown-0000 
client-error-bad-request: Attribute groups are out of order (1 < 7)!
Apr 13 16:41:05 server cupsd[11435]: cupsdProcessIPPRequest: 9 
status_code=400 (client-error-bad-request)
########################################################################

Any ideas what¹s going awry with the IPP request? The error seems to be 
coming from scheduler/ipp.c, but any further suggestions would be 
greatly appreciated. FWIW, the notifier is currently invoked upon the 
event ³job-state-changed².

Thanks,
Rodger




More information about the cups-devel mailing list