]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | /* |
b19ccc9e | 2 | * "$Id: printers.c 7940 2008-09-16 00:45:16Z mike $" |
ef416fc2 | 3 | * |
4 | * Printer status CGI for the Common UNIX Printing System (CUPS). | |
5 | * | |
5bd77a73 | 6 | * Copyright 2007-2008 by Apple Inc. |
ef416fc2 | 7 | * Copyright 1997-2006 by Easy Software Products. |
8 | * | |
9 | * These coded instructions, statements, and computer programs are the | |
bc44d920 | 10 | * property of Apple Inc. and are protected by Federal copyright |
11 | * law. Distribution and use rights are outlined in the file "LICENSE.txt" | |
12 | * which should have been included with this file. If this file is | |
13 | * file is missing or damaged, see the license at "http://www.cups.org/". | |
ef416fc2 | 14 | * |
15 | * Contents: | |
16 | * | |
ef416fc2 | 17 | */ |
18 | ||
19 | /* | |
20 | * Include necessary headers... | |
21 | */ | |
22 | ||
23 | #include "cgi-private.h" | |
b423cd4c | 24 | #include <errno.h> |
ef416fc2 | 25 | |
26 | ||
fa73b229 | 27 | /* |
28 | * Local functions... | |
29 | */ | |
30 | ||
58dc1933 MS |
31 | static void do_printer_op(http_t *http, const char *printer, ipp_op_t op, |
32 | const char *title); | |
33 | static void show_all_printers(http_t *http, const char *username); | |
34 | static void show_printer(http_t *http, const char *printer); | |
fa73b229 | 35 | |
36 | ||
ef416fc2 | 37 | /* |
38 | * 'main()' - Main entry for CGI. | |
39 | */ | |
40 | ||
41 | int /* O - Exit status */ | |
42 | main(int argc, /* I - Number of command-line arguments */ | |
43 | char *argv[]) /* I - Command-line arguments */ | |
44 | { | |
fa73b229 | 45 | const char *printer; /* Printer name */ |
46 | const char *user; /* Username */ | |
ef416fc2 | 47 | http_t *http; /* Connection to the server */ |
48 | ipp_t *request, /* IPP request */ | |
49 | *response; /* IPP response */ | |
50 | ipp_attribute_t *attr; /* IPP attribute */ | |
ef416fc2 | 51 | const char *op; /* Operation to perform, if any */ |
ef416fc2 | 52 | static const char *def_attrs[] = /* Attributes for default printer */ |
53 | { | |
54 | "printer-name", | |
55 | "printer-uri-supported" | |
56 | }; | |
57 | ||
58 | ||
59 | /* | |
60 | * Get any form variables... | |
61 | */ | |
62 | ||
63 | cgiInitialize(); | |
ef416fc2 | 64 | |
fa73b229 | 65 | op = cgiGetVariable("OP"); |
ef416fc2 | 66 | |
67 | /* | |
68 | * Set the web interface section... | |
69 | */ | |
70 | ||
71 | cgiSetVariable("SECTION", "printers"); | |
72 | ||
73 | /* | |
fa73b229 | 74 | * See if we are displaying a printer or all printers... |
ef416fc2 | 75 | */ |
76 | ||
b423cd4c | 77 | if ((printer = getenv("PATH_INFO")) != NULL) |
4744bd90 | 78 | { |
b423cd4c | 79 | printer ++; |
ef416fc2 | 80 | |
4744bd90 | 81 | if (!*printer) |
82 | printer = NULL; | |
58dc1933 MS |
83 | |
84 | if (printer) | |
85 | cgiSetVariable("PRINTER_NAME", printer); | |
4744bd90 | 86 | } |
87 | ||
ef416fc2 | 88 | /* |
fa73b229 | 89 | * See who is logged in... |
ef416fc2 | 90 | */ |
91 | ||
f301802f | 92 | user = getenv("REMOTE_USER"); |
ef416fc2 | 93 | |
94 | /* | |
fa73b229 | 95 | * Connect to the HTTP server... |
ef416fc2 | 96 | */ |
97 | ||
fa73b229 | 98 | http = httpConnectEncrypt(cupsServer(), ippPort(), cupsEncryption()); |
ef416fc2 | 99 | |
fa73b229 | 100 | /* |
101 | * Get the default printer... | |
102 | */ | |
ef416fc2 | 103 | |
2e4ff8af | 104 | if (!op || !cgiIsPOST()) |
ef416fc2 | 105 | { |
106 | /* | |
107 | * Get the default destination... | |
108 | */ | |
109 | ||
fa73b229 | 110 | request = ippNewRequest(CUPS_GET_DEFAULT); |
ef416fc2 | 111 | |
112 | ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, | |
113 | "requested-attributes", | |
114 | sizeof(def_attrs) / sizeof(def_attrs[0]), NULL, def_attrs); | |
115 | ||
116 | if ((response = cupsDoRequest(http, request, "/")) != NULL) | |
117 | { | |
118 | if ((attr = ippFindAttribute(response, "printer-name", IPP_TAG_NAME)) != NULL) | |
119 | cgiSetVariable("DEFAULT_NAME", attr->values[0].string.text); | |
120 | ||
121 | if ((attr = ippFindAttribute(response, "printer-uri-supported", IPP_TAG_URI)) != NULL) | |
122 | { | |
123 | char url[HTTP_MAX_URI]; /* New URL */ | |
124 | ||
125 | ||
126 | cgiSetVariable("DEFAULT_URI", | |
127 | cgiRewriteURL(attr->values[0].string.text, | |
128 | url, sizeof(url), NULL)); | |
129 | } | |
130 | ||
131 | ippDelete(response); | |
132 | } | |
133 | ||
134 | /* | |
fa73b229 | 135 | * See if we need to show a list of printers or the status of a |
136 | * single printer... | |
ef416fc2 | 137 | */ |
138 | ||
fa73b229 | 139 | if (!printer) |
140 | show_all_printers(http, user); | |
141 | else | |
142 | show_printer(http, printer); | |
143 | } | |
58dc1933 MS |
144 | else if (printer) |
145 | { | |
146 | if (!strcmp(op, "start-printer")) | |
147 | do_printer_op(http, printer, IPP_RESUME_PRINTER, | |
148 | cgiText(_("Resume Printer"))); | |
149 | else if (!strcmp(op, "stop-printer")) | |
150 | do_printer_op(http, printer, IPP_PAUSE_PRINTER, | |
151 | cgiText(_("Pause Printer"))); | |
152 | else if (!strcmp(op, "accept-jobs")) | |
153 | do_printer_op(http, printer, CUPS_ACCEPT_JOBS, cgiText(_("Accept Jobs"))); | |
154 | else if (!strcmp(op, "reject-jobs")) | |
155 | do_printer_op(http, printer, CUPS_REJECT_JOBS, cgiText(_("Reject Jobs"))); | |
156 | else if (!strcmp(op, "purge-jobs")) | |
157 | do_printer_op(http, printer, IPP_PURGE_JOBS, cgiText(_("Purge Jobs"))); | |
158 | else if (!strcasecmp(op, "print-self-test-page")) | |
159 | cgiPrintCommand(http, printer, "PrintSelfTestPage", | |
160 | cgiText(_("Print Self-Test Page"))); | |
161 | else if (!strcasecmp(op, "clean-print-heads")) | |
162 | cgiPrintCommand(http, printer, "Clean all", | |
163 | cgiText(_("Clean Print Heads"))); | |
164 | else if (!strcasecmp(op, "print-test-page")) | |
165 | cgiPrintTestPage(http, printer); | |
166 | else if (!strcasecmp(op, "move-jobs")) | |
167 | cgiMoveJobs(http, printer, 0); | |
168 | else | |
169 | { | |
170 | /* | |
171 | * Unknown/bad operation... | |
172 | */ | |
173 | ||
174 | cgiStartHTML(printer); | |
175 | cgiCopyTemplateLang("error-op.tmpl"); | |
176 | cgiEndHTML(); | |
177 | } | |
178 | } | |
fa73b229 | 179 | else |
180 | { | |
181 | /* | |
182 | * Unknown/bad operation... | |
183 | */ | |
ef416fc2 | 184 | |
58dc1933 | 185 | cgiStartHTML(cgiText(_("Printers"))); |
fa73b229 | 186 | cgiCopyTemplateLang("error-op.tmpl"); |
187 | cgiEndHTML(); | |
188 | } | |
ef416fc2 | 189 | |
fa73b229 | 190 | /* |
191 | * Close the HTTP server connection... | |
192 | */ | |
193 | ||
194 | httpClose(http); | |
195 | ||
196 | /* | |
197 | * Return with no errors... | |
198 | */ | |
ef416fc2 | 199 | |
fa73b229 | 200 | return (0); |
201 | } | |
ef416fc2 | 202 | |
ef416fc2 | 203 | |
b423cd4c | 204 | /* |
58dc1933 | 205 | * 'do_printer_op()' - Do a printer operation. |
b423cd4c | 206 | */ |
207 | ||
58dc1933 MS |
208 | static void |
209 | do_printer_op(http_t *http, /* I - HTTP connection */ | |
210 | const char *printer, /* I - Printer name */ | |
211 | ipp_op_t op, /* I - Operation to perform */ | |
212 | const char *title) /* I - Title of page */ | |
b423cd4c | 213 | { |
58dc1933 | 214 | ipp_t *request; /* IPP request */ |
b423cd4c | 215 | char uri[HTTP_MAX_URI], /* Printer URI */ |
58dc1933 | 216 | resource[HTTP_MAX_URI]; /* Path for request */ |
b423cd4c | 217 | |
b423cd4c | 218 | |
219 | /* | |
58dc1933 | 220 | * Build a printer request, which requires the following |
b423cd4c | 221 | * attributes: |
222 | * | |
223 | * attributes-charset | |
224 | * attributes-natural-language | |
225 | * printer-uri | |
b423cd4c | 226 | */ |
227 | ||
58dc1933 | 228 | request = ippNewRequest(op); |
b423cd4c | 229 | |
58dc1933 MS |
230 | httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL, |
231 | "localhost", 0, "/printers/%s", printer); | |
b423cd4c | 232 | ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", |
233 | NULL, uri); | |
234 | ||
b423cd4c | 235 | /* |
236 | * Do the request and get back a response... | |
237 | */ | |
238 | ||
58dc1933 MS |
239 | snprintf(resource, sizeof(resource), "/printers/%s", printer); |
240 | ippDelete(cupsDoRequest(http, request, resource)); | |
b423cd4c | 241 | |
58dc1933 MS |
242 | if (cupsLastError() == IPP_NOT_AUTHORIZED) |
243 | { | |
244 | puts("Status: 401\n"); | |
245 | exit(0); | |
b423cd4c | 246 | } |
58dc1933 MS |
247 | else if (cupsLastError() > IPP_OK_CONFLICT) |
248 | { | |
249 | cgiStartHTML(title); | |
250 | cgiShowIPPError(_("Unable to do maintenance command:")); | |
251 | } | |
252 | else | |
b423cd4c | 253 | { |
254 | /* | |
58dc1933 | 255 | * Redirect successful updates back to the printer page... |
b423cd4c | 256 | */ |
257 | ||
58dc1933 MS |
258 | char url[1024], /* Printer/class URL */ |
259 | refresh[1024]; /* Refresh URL */ | |
b423cd4c | 260 | |
b423cd4c | 261 | |
58dc1933 MS |
262 | cgiRewriteURL(uri, url, sizeof(url), NULL); |
263 | cgiFormEncode(uri, url, sizeof(uri)); | |
264 | snprintf(refresh, sizeof(refresh), "5;URL=q%s", uri); | |
265 | cgiSetVariable("refresh_page", refresh); | |
b423cd4c | 266 | |
58dc1933 MS |
267 | cgiStartHTML(title); |
268 | ||
269 | if (op == IPP_PAUSE_PRINTER) | |
270 | cgiCopyTemplateLang("printer-stop.tmpl"); | |
271 | else if (op == IPP_RESUME_PRINTER) | |
272 | cgiCopyTemplateLang("printer-start.tmpl"); | |
273 | else if (op == CUPS_ACCEPT_JOBS) | |
274 | cgiCopyTemplateLang("printer-accept.tmpl"); | |
275 | else if (op == CUPS_REJECT_JOBS) | |
276 | cgiCopyTemplateLang("printer-reject.tmpl"); | |
277 | else if (op == IPP_PURGE_JOBS) | |
278 | cgiCopyTemplateLang("printer-purge.tmpl"); | |
b423cd4c | 279 | } |
280 | ||
281 | cgiEndHTML(); | |
282 | } | |
283 | ||
284 | ||
fa73b229 | 285 | /* |
286 | * 'show_all_printers()' - Show all printers... | |
287 | */ | |
ef416fc2 | 288 | |
58dc1933 | 289 | static void |
fa73b229 | 290 | show_all_printers(http_t *http, /* I - Connection to server */ |
291 | const char *user) /* I - Username */ | |
292 | { | |
293 | int i; /* Looping var */ | |
294 | ipp_t *request, /* IPP request */ | |
295 | *response; /* IPP response */ | |
296 | cups_array_t *printers; /* Array of printer objects */ | |
e6013cfa | 297 | ipp_attribute_t *printer; /* Printer object */ |
fa73b229 | 298 | int ascending, /* Order of printers (0 = descending) */ |
299 | first, /* First printer to show */ | |
300 | count; /* Number of printers */ | |
301 | const char *var; /* Form variable */ | |
302 | void *search; /* Search data */ | |
2e4ff8af | 303 | char val[1024]; /* Form variable */ |
ef416fc2 | 304 | |
ef416fc2 | 305 | |
bd7854cb | 306 | fprintf(stderr, "DEBUG: show_all_printers(http=%p, user=\"%s\")\n", |
f301802f | 307 | http, user ? user : "(null)"); |
bd7854cb | 308 | |
fa73b229 | 309 | /* |
310 | * Show the standard header... | |
311 | */ | |
ef416fc2 | 312 | |
fa73b229 | 313 | cgiStartHTML(cgiText(_("Printers"))); |
ef416fc2 | 314 | |
fa73b229 | 315 | /* |
316 | * Build a CUPS_GET_PRINTERS request, which requires the following | |
317 | * attributes: | |
318 | * | |
319 | * attributes-charset | |
320 | * attributes-natural-language | |
321 | * printer-type | |
322 | * printer-type-mask | |
323 | * requesting-user-name | |
324 | */ | |
ef416fc2 | 325 | |
fa73b229 | 326 | request = ippNewRequest(CUPS_GET_PRINTERS); |
ef416fc2 | 327 | |
fa73b229 | 328 | ippAddInteger(request, IPP_TAG_OPERATION, IPP_TAG_ENUM, |
329 | "printer-type", 0); | |
330 | ippAddInteger(request, IPP_TAG_OPERATION, IPP_TAG_ENUM, | |
331 | "printer-type-mask", CUPS_PRINTER_CLASS); | |
ef416fc2 | 332 | |
f301802f | 333 | if (user) |
334 | ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, | |
335 | "requesting-user-name", NULL, user); | |
ef416fc2 | 336 | |
fa73b229 | 337 | cgiGetAttributes(request, "printers.tmpl"); |
ef416fc2 | 338 | |
fa73b229 | 339 | /* |
340 | * Do the request and get back a response... | |
341 | */ | |
342 | ||
343 | if ((response = cupsDoRequest(http, request, "/")) != NULL) | |
344 | { | |
ef416fc2 | 345 | /* |
fa73b229 | 346 | * Get a list of matching job objects. |
ef416fc2 | 347 | */ |
348 | ||
2e4ff8af MS |
349 | if ((var = cgiGetVariable("QUERY")) != NULL && |
350 | !cgiGetVariable("CLEAR")) | |
fa73b229 | 351 | search = cgiCompileSearch(var); |
352 | else | |
353 | search = NULL; | |
ef416fc2 | 354 | |
fa73b229 | 355 | printers = cgiGetIPPObjects(response, search); |
356 | count = cupsArrayCount(printers); | |
ef416fc2 | 357 | |
fa73b229 | 358 | if (search) |
359 | cgiFreeSearch(search); | |
ef416fc2 | 360 | |
361 | /* | |
fa73b229 | 362 | * Figure out which printers to display... |
ef416fc2 | 363 | */ |
364 | ||
fa73b229 | 365 | if ((var = cgiGetVariable("FIRST")) != NULL) |
366 | first = atoi(var); | |
367 | else | |
368 | first = 0; | |
ef416fc2 | 369 | |
fa73b229 | 370 | if (first >= count) |
371 | first = count - CUPS_PAGE_MAX; | |
ef416fc2 | 372 | |
fa73b229 | 373 | first = (first / CUPS_PAGE_MAX) * CUPS_PAGE_MAX; |
ef416fc2 | 374 | |
fa73b229 | 375 | if (first < 0) |
376 | first = 0; | |
ef416fc2 | 377 | |
2e4ff8af MS |
378 | sprintf(val, "%d", count); |
379 | cgiSetVariable("TOTAL", val); | |
ef416fc2 | 380 | |
fa73b229 | 381 | if ((var = cgiGetVariable("ORDER")) != NULL) |
382 | ascending = !strcasecmp(var, "asc"); | |
383 | else | |
384 | ascending = 1; | |
ef416fc2 | 385 | |
fa73b229 | 386 | if (ascending) |
387 | { | |
388 | for (i = 0, printer = (ipp_attribute_t *)cupsArrayIndex(printers, first); | |
389 | i < CUPS_PAGE_MAX && printer; | |
390 | i ++, printer = (ipp_attribute_t *)cupsArrayNext(printers)) | |
391 | cgiSetIPPObjectVars(printer, NULL, i); | |
392 | } | |
393 | else | |
394 | { | |
395 | for (i = 0, printer = (ipp_attribute_t *)cupsArrayIndex(printers, count - first - 1); | |
396 | i < CUPS_PAGE_MAX && printer; | |
397 | i ++, printer = (ipp_attribute_t *)cupsArrayPrev(printers)) | |
398 | cgiSetIPPObjectVars(printer, NULL, i); | |
399 | } | |
ef416fc2 | 400 | |
fa73b229 | 401 | /* |
402 | * Save navigation URLs... | |
403 | */ | |
ef416fc2 | 404 | |
2e4ff8af | 405 | cgiSetVariable("THISURL", "/printers/"); |
fa73b229 | 406 | |
407 | if (first > 0) | |
408 | { | |
2e4ff8af MS |
409 | sprintf(val, "%d", first - CUPS_PAGE_MAX); |
410 | cgiSetVariable("PREV", val); | |
ef416fc2 | 411 | } |
fa73b229 | 412 | |
413 | if ((first + CUPS_PAGE_MAX) < count) | |
414 | { | |
2e4ff8af MS |
415 | sprintf(val, "%d", first + CUPS_PAGE_MAX); |
416 | cgiSetVariable("NEXT", val); | |
fa73b229 | 417 | } |
418 | ||
ef416fc2 | 419 | /* |
fa73b229 | 420 | * Then show everything... |
ef416fc2 | 421 | */ |
422 | ||
fa73b229 | 423 | cgiCopyTemplateLang("search.tmpl"); |
ef416fc2 | 424 | |
fa73b229 | 425 | cgiCopyTemplateLang("printers-header.tmpl"); |
ef416fc2 | 426 | |
b19ccc9e | 427 | if (count > CUPS_PAGE_MAX) |
fa73b229 | 428 | cgiCopyTemplateLang("pager.tmpl"); |
ef416fc2 | 429 | |
fa73b229 | 430 | cgiCopyTemplateLang("printers.tmpl"); |
ef416fc2 | 431 | |
b19ccc9e | 432 | if (count > CUPS_PAGE_MAX) |
fa73b229 | 433 | cgiCopyTemplateLang("pager.tmpl"); |
ef416fc2 | 434 | |
435 | /* | |
fa73b229 | 436 | * Delete the response... |
ef416fc2 | 437 | */ |
438 | ||
bd7854cb | 439 | cupsArrayDelete(printers); |
fa73b229 | 440 | ippDelete(response); |
441 | } | |
442 | else | |
443 | { | |
444 | /* | |
445 | * Show the error... | |
446 | */ | |
ef416fc2 | 447 | |
fa73b229 | 448 | cgiShowIPPError(_("Unable to get printer list:")); |
449 | } | |
ef416fc2 | 450 | |
fa73b229 | 451 | cgiEndHTML(); |
452 | } | |
ef416fc2 | 453 | |
ef416fc2 | 454 | |
fa73b229 | 455 | /* |
456 | * 'show_printer()' - Show a single printer. | |
457 | */ | |
ef416fc2 | 458 | |
58dc1933 | 459 | static void |
fa73b229 | 460 | show_printer(http_t *http, /* I - Connection to server */ |
461 | const char *printer) /* I - Name of printer */ | |
462 | { | |
463 | ipp_t *request, /* IPP request */ | |
464 | *response; /* IPP response */ | |
465 | ipp_attribute_t *attr; /* IPP attribute */ | |
466 | char uri[HTTP_MAX_URI]; /* Printer URI */ | |
467 | char refresh[1024]; /* Refresh URL */ | |
ef416fc2 | 468 | |
ef416fc2 | 469 | |
bd7854cb | 470 | fprintf(stderr, "DEBUG: show_printer(http=%p, printer=\"%s\")\n", |
f301802f | 471 | http, printer ? printer : "(null)"); |
bd7854cb | 472 | |
fa73b229 | 473 | /* |
474 | * Build an IPP_GET_PRINTER_ATTRIBUTES request, which requires the following | |
475 | * attributes: | |
476 | * | |
477 | * attributes-charset | |
478 | * attributes-natural-language | |
479 | * printer-uri | |
480 | */ | |
481 | ||
482 | request = ippNewRequest(IPP_GET_PRINTER_ATTRIBUTES); | |
483 | ||
a4d04587 | 484 | httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL, |
485 | "localhost", 0, "/printers/%s", printer); | |
fa73b229 | 486 | ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, |
487 | uri); | |
488 | ||
b19ccc9e | 489 | cgiGetAttributes(request, "printer.tmpl"); |
fa73b229 | 490 | |
491 | /* | |
492 | * Do the request and get back a response... | |
493 | */ | |
ef416fc2 | 494 | |
fa73b229 | 495 | if ((response = cupsDoRequest(http, request, "/")) != NULL) |
496 | { | |
ef416fc2 | 497 | /* |
fa73b229 | 498 | * Got the result; set the CGI variables and check the status of a |
499 | * single-queue request... | |
ef416fc2 | 500 | */ |
501 | ||
fa73b229 | 502 | cgiSetIPPVars(response, NULL, NULL, NULL, 0); |
503 | ||
504 | if (printer && (attr = ippFindAttribute(response, "printer-state", | |
505 | IPP_TAG_ENUM)) != NULL && | |
506 | attr->values[0].integer == IPP_PRINTER_PROCESSING) | |
ef416fc2 | 507 | { |
fa73b229 | 508 | /* |
509 | * Printer is processing - automatically refresh the page until we | |
510 | * are done printing... | |
511 | */ | |
ef416fc2 | 512 | |
fa73b229 | 513 | cgiFormEncode(uri, printer, sizeof(uri)); |
f301802f | 514 | snprintf(refresh, sizeof(refresh), "10;URL=/printers/%s", uri); |
fa73b229 | 515 | cgiSetVariable("refresh_page", refresh); |
ef416fc2 | 516 | } |
ef416fc2 | 517 | |
fa73b229 | 518 | /* |
519 | * Delete the response... | |
520 | */ | |
521 | ||
522 | ippDelete(response); | |
ef416fc2 | 523 | |
524 | /* | |
525 | * Show the standard header... | |
526 | */ | |
527 | ||
fa73b229 | 528 | cgiStartHTML(printer); |
ef416fc2 | 529 | |
530 | /* | |
fa73b229 | 531 | * Show the printer status... |
ef416fc2 | 532 | */ |
533 | ||
b19ccc9e | 534 | cgiCopyTemplateLang("printer.tmpl"); |
ef416fc2 | 535 | |
fa73b229 | 536 | /* |
537 | * Show jobs for the specified printer... | |
538 | */ | |
ef416fc2 | 539 | |
fa73b229 | 540 | cgiCopyTemplateLang("printer-jobs-header.tmpl"); |
541 | cgiShowJobs(http, printer); | |
542 | } | |
543 | else | |
544 | { | |
545 | /* | |
546 | * Show the IPP error... | |
547 | */ | |
ef416fc2 | 548 | |
fa73b229 | 549 | cgiStartHTML(printer); |
550 | cgiShowIPPError(_("Unable to get printer status:")); | |
551 | } | |
ef416fc2 | 552 | |
fa73b229 | 553 | cgiEndHTML(); |
ef416fc2 | 554 | } |
555 | ||
556 | ||
557 | /* | |
b19ccc9e | 558 | * End of "$Id: printers.c 7940 2008-09-16 00:45:16Z mike $". |
ef416fc2 | 559 | */ |