X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fcups.git;a=blobdiff_plain;f=scheduler%2Fprinters.c;h=4f69babbecaf85c923603b132058a76875effaf1;hp=3400de54953a89fb0382110ec9e92fbcc5addbbf;hb=2e4ff8afcbae91304495e2c90b4965420422e363;hpb=56ab62c60cfb18c20468bbec182c52e7dc184195 diff --git a/scheduler/printers.c b/scheduler/printers.c index 3400de549..4f69babbe 100644 --- a/scheduler/printers.c +++ b/scheduler/printers.c @@ -1,5 +1,5 @@ /* - * "$Id: printers.c 6971 2007-09-17 23:59:05Z mike $" + * "$Id: printers.c 6970 2007-09-17 23:58:28Z mike $" * * Printer routines for the Common UNIX Printing System (CUPS). * @@ -257,6 +257,7 @@ cupsdCreateCommonData(void) cups_array_t *notifiers; /* Notifier array */ char filename[1024], /* Filename */ *notifier; /* Current notifier */ + cupsd_policy_t *p; /* Current policy */ static const int nups[] = /* number-up-supported values */ { 1, 2, 4, 6, 9, 16 }; static const int orients[4] =/* orientation-requested-supported values */ @@ -321,6 +322,8 @@ cupsdCreateCommonData(void) CUPS_GET_PPDS, CUPS_MOVE_JOB, CUPS_AUTHENTICATE_JOB, + CUPS_GET_PPD, + CUPS_GET_DOCUMENT, IPP_RESTART_JOB }; static const char * const charsets[] =/* charset-supported values */ @@ -562,9 +565,15 @@ cupsdCreateCommonData(void) /* printer-op-policy-supported */ attr = ippAddStrings(CommonData, IPP_TAG_PRINTER, IPP_TAG_NAME, - "printer-op-policy-supported", NumPolicies, NULL, NULL); - for (i = 0; i < NumPolicies; i ++) - attr->values[i].string.text = _cupsStrAlloc(Policies[i]->name); + "printer-op-policy-supported", cupsArrayCount(Policies), + NULL, NULL); + for (i = 0, p = (cupsd_policy_t *)cupsArrayFirst(Policies); + p; + i ++, p = (cupsd_policy_t *)cupsArrayNext(Policies)) + attr->values[i].string.text = _cupsStrAlloc(p->name); + + ippAddBoolean(CommonData, IPP_TAG_PRINTER, "server-is-sharing-printers", + BrowseLocalProtocols != 0 && Browsing); } @@ -3766,5 +3775,5 @@ write_irix_state(cupsd_printer_t *p) /* I - Printer to update */ /* - * End of "$Id: printers.c 6971 2007-09-17 23:59:05Z mike $". + * End of "$Id: printers.c 6970 2007-09-17 23:58:28Z mike $". */