How to correctly submit a JOB with Event Subscription via IPP

Gustavo Carreno gcarreno.pt at gmail.com
Tue May 8 02:06:06 PDT 2007


> Gustavo Carreno wrote:
> > Hi there,
> >
> > I'm currently working on a company project that involves using IPP communication with a CUPS server.
> >
> > I've done all the RFC reading and got a nice little ipp class that can do quite allot: get printer attributes, print job, get job attributes, get jobs, etc..
> >
> > I'm stuck on the subscription sequence for a print-job operation. I'm doing:
> > version(1.1)
> > operation(IPP_PRINT_JOB)
> > request-id(1)
> > tag-operation
> > tag-charset(attributes-charset = utf-8)
> > tag-language(attributes-natural-language = en_US)
> > tag-uri(printer-uri = ipp://forest/)
> > tag-name(notify-subscriber-user-name = username)
> > tag-uri(notify-recipient-uri = ipp://client/)
> > tag-keyword(notify-events = job-completed)
> > tag-charset(notify-charset = utf-8)
> > tag-language(notify-natural-language = en_US)
> > 0x03
> >
> > On the error_log all the notify- get shown, but the notify-recipient-uri, and all the events are shown as ignored.
> >
> > What am I doing wrong ?
>
> You need to use a valid recipient URI; "ipp:/client/" is not a
> standard notification scheme - unless you have an "ipp" notifier in
> the /usr/lib/cups/notifier directory, it won't be accepted as a
> subscription (and you probably will get an error).

Hummm, Okay, I'm using 1.2.4 and the notifiers are mailto and testnotify.
I've tested mailto with printer subscription and it went fine with the little correction you mentioned about notify-recipient(-uri).

I'm now testing subscribing from a print-job operation but CUPS just crashes. Here are the arrays of Job-Template and Subscription-Template:

$attr[] = array('object' => 'job',          0 => array(IPP_TAG_NAME => array('sides', 'two-sided-long-edge')));
$attr[] = array('object' => 'subscription', 0 => array(IPP_TAG_URI => array('notify-recipient', 'mailto:person at example.com')),
                                            1 => array(IPP_TAG_KEYWORD => array('notify-events', 'job-completed')),
                                            2 => array(IPP_TAG_KEYWORD => array('notify-attributes', 'notify-lease-expiration-time')),
                                            3 => array(IPP_TAG_KEYWORD => array('', 'notify-subscriber-user-name')),
                                            4 => array(IPP_TAG_INTEGER => array('notify-lease-expiration-time', 86400 / 2 )),
                                            5 => array(IPP_TAG_INTEGER => array('notify-lease-duration', 86400 / 2 )));

The Subscription-Template worked just fine in the Printer-Subscription Operation but it's crashing CUPS on the Print-Job operation.

Was it me mis-interpreting the RFC's about this or is it a problem in CUPS ?

I'm more inclined that it's me messing up. But I'm still pulling my hair out and have gone nowhere.

Many Thanks in advance!!
Gustavo Carreno




More information about the cups mailing list