}
// Initialize the page header...
- memset(h, 0, sizeof(cups_page_header_t));
+ memset(h, 0, sizeof(cups_page_header2_t));
cupsCopyString(h->MediaClass, "PwgRaster", sizeof(h->MediaClass));
cupsCopyString(h->MediaColor, media->color, sizeof(h->MediaColor));
int interval, /* notify-time-interval */
lease; /* notify-lease-duration */
unsigned mask; /* notify-events */
- ipp_attribute_t *notify_events,/* notify-events(-default) */
+ ipp_attribute_t *notify_events, /* notify-events(-default) */
*notify_lease; /* notify-lease-duration(-default) */
if (printer)
{
- notify_events = ippFindAttribute(printer->attrs, "notify-events-default",
- IPP_TAG_KEYWORD);
- notify_lease = ippFindAttribute(printer->attrs,
- "notify-lease-duration-default",
- IPP_TAG_INTEGER);
+ // Get default events and lease duration for printer/class...
+ notify_events = ippFindAttribute(printer->attrs, "notify-events-default", IPP_TAG_KEYWORD);
- if (notify_lease)
+ if ((notify_lease = ippFindAttribute(printer->attrs, "notify-lease-duration-default", IPP_TAG_INTEGER)) != NULL)
lease = notify_lease->values[0].integer;
}
else
{
+ // No defaults...
notify_events = NULL;
- notify_lease = NULL;
}
while (attr && attr->group_tag != IPP_TAG_ZERO)
cupsdLogJob(job, CUPSD_LOG_DEBUG,
"Unable to add decompression filter - %s", strerror(errno));
- cupsArrayDelete(filters);
-
abort_message = "Stopping job because the scheduler ran out of memory.";
goto abort_job;
if ((file = ippFileNew(data->parent, NULL, (ipp_ferror_cb_t)error_cb, data)) == NULL)
{
print_fatal_error(data, "Unable to create test file parser: %s", cupsGetErrorString());
- return (false);
+ data->pass = false;
}
-
- if (!ippFileOpen(file, testfile, "r"))
+ else if (ippFileOpen(file, testfile, "r"))
{
+ // Successfully opened file, read from it...
+ ippFileRead(file, (ipp_ftoken_cb_t)token_cb, true);
+ }
+ else
+ {
+ // Report the error...
print_fatal_error(data, "Unable to open '%s': %s", testfile, cupsGetErrorString());
- return (false);
+ data->pass = false;
}
- ippFileRead(file, (ipp_ftoken_cb_t)token_cb, true);
-
ippFileDelete(file);
// Close connection and return...