MCPcopy Create free account
hub / github.com/OpenPrinting/cups / get_default

Function get_default

scheduler/ipp.c:6381–6412  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6379 */
6380
6381static void
6382get_default(cupsd_client_t *con) /* I - Client connection */
6383{
6384 http_status_t status; /* Policy status */
6385 cups_array_t *ra; /* Requested attributes array */
6386
6387
6388 cupsdLogMessage(CUPSD_LOG_DEBUG2, "get_default(%p[%d])", (void *)con, con->number);
6389
6390 /*
6391 * Check policy...
6392 */
6393
6394 if ((status = cupsdCheckPolicy(DefaultPolicyPtr, con, NULL)) != HTTP_OK)
6395 {
6396 send_http_error(con, status, NULL);
6397 return;
6398 }
6399
6400 if (DefaultPrinter)
6401 {
6402 ra = create_requested_array(con->request);
6403
6404 copy_printer_attrs(con, DefaultPrinter, ra);
6405
6406 cupsArrayDelete(ra);
6407
6408 con->response->request.status.status_code = IPP_OK;
6409 }
6410 else
6411 send_ipp_status(con, IPP_NOT_FOUND, _("No default printer."));
6412}
6413
6414
6415/*

Callers 1

cupsdProcessIPPRequestFunction · 0.85

Calls 7

cupsdLogMessageFunction · 0.85
cupsdCheckPolicyFunction · 0.85
send_http_errorFunction · 0.85
create_requested_arrayFunction · 0.85
copy_printer_attrsFunction · 0.85
cupsArrayDeleteFunction · 0.85
send_ipp_statusFunction · 0.85

Tested by

no test coverage detected