Index: ipp.c =================================================================== --- ipp.c (revision 6431) +++ ipp.c (working copy) @@ -4433,6 +4433,16 @@ printer->recoverable); #endif /* __APPLE__ */ + if (printer->alert && (!ra || cupsArrayFind(ra, "printer-alert"))) + ippAddString(con->response, IPP_TAG_PRINTER, IPP_TAG_STRING, + "printer-alert", NULL, printer->alert); + + if (printer->alert_description && + (!ra || cupsArrayFind(ra, "printer-alert-description"))) + ippAddString(con->response, IPP_TAG_PRINTER, IPP_TAG_TEXT, + "printer-alert-description", NULL, + printer->alert_description); + if (!ra || cupsArrayFind(ra, "printer-current-time")) ippAddDate(con->response, IPP_TAG_PRINTER, "printer-current-time", ippTimeToDate(curtime)); @@ -4825,6 +4835,8 @@ cupsArrayAdd(ra, "pages-per-minute"); cupsArrayAdd(ra, "pages-per-minute-color"); cupsArrayAdd(ra, "pdl-override-supported"); + cupsArrayAdd(ra, "printer-alert"); + cupsArrayAdd(ra, "printer-alert-description"); cupsArrayAdd(ra, "printer-current-time"); cupsArrayAdd(ra, "printer-driver-installer"); cupsArrayAdd(ra, "printer-info"); Index: printers.c =================================================================== --- printers.c (revision 6431) +++ printers.c (working copy) @@ -747,6 +747,9 @@ cupsdClearString(&p->op_policy); cupsdClearString(&p->error_policy); + cupsdClearString(&p->alert); + cupsdClearString(&p->alert_description); + #ifdef HAVE_DNSSD cupsdClearString(&p->product); cupsdClearString(&p->pdl); Index: job.c =================================================================== --- job.c (revision 6431) +++ job.c (working copy) @@ -3458,6 +3458,19 @@ attrs)) != NULL) cupsdSetAuthInfoRequired(job->printer, attr, NULL); + if ((attr = cupsGetOption("printer-alert", num_attrs, attrs)) != NULL) + { + cupsdSetString(&job->printer->alert, attr); + event |= CUPSD_EVENT_PRINTER_STATE_CHANGED; + } + + if ((attr = cupsGetOption("printer-alert-description", num_attrs, + attrs)) != NULL) + { + cupsdSetString(&job->printer->alert_description, attr); + event |= CUPSD_EVENT_PRINTER_STATE_CHANGED; + } + cupsFreeOptions(num_attrs, attrs); } #ifdef __APPLE__ Index: printers.h =================================================================== --- printers.h (revision 6431) +++ printers.h (working copy) @@ -93,6 +93,9 @@ cups_option_t *options; /* Default options */ int num_auth_info_required; /* Number of required auth fields */ const char *auth_info_required[4]; /* Required authentication fields */ + char *alert, /* PSX printer-alert value */ + *alert_description; /* PSX printer-alert-description value */ + #ifdef __APPLE__ char *recoverable; /* com.apple.print.recoverable-message */ #endif /* __APPLE__ */