release_held_new_jobs(
    cupsd_client_t  *con,		/* I - Connection */
    ipp_attribute_t *uri)		/* I - Printer URI */
{
  http_status_t		status;		/* Policy status */
  cups_ptype_t		dtype;		/* Destination type (printer/class) */
  cupsd_printer_t	*printer;	/* Printer data */


  cupsdLogMessage(CUPSD_LOG_DEBUG2, "release_held_new_jobs(%p[%d], %s)", con,
                  con->number, uri->values[0].string.text);

 /*
  * Is the destination valid?
  */

  if (!cupsdValidateDest(uri->values[0].string.text, &dtype, &printer))
  {
   /*
    * Bad URI...
    */

    send_ipp_status(con, IPP_NOT_FOUND,
                    _("The printer or class does not exist."));
    return;
  }

 /*
  * Check policy...
  */

  if ((status = cupsdCheckPolicy(printer->op_policy_ptr, con, NULL)) != HTTP_OK)
  {
    send_http_error(con, status, printer);
    return;
  }

 /*
  * Hold pending/new jobs sent to the printer...
  */

  printer->holding_new_jobs = 0;

  cupsdSetPrinterReasons(printer, "-hold-new-jobs");

  if (dtype & CUPS_PRINTER_CLASS)
    cupsdLogMessage(CUPSD_LOG_INFO,
                    "Class \"%s\" now printing pending/new jobs (\"%s\").",
                    printer->name, get_username(con));
  else
    cupsdLogMessage(CUPSD_LOG_INFO,
                    "Printer \"%s\" now printing pending/new jobs (\"%s\").",
                    printer->name, get_username(con));

  cupsdCheckJobs();

 /*
  * Everything was ok, so return OK status...
  */

  con->response->request.status.status_code = IPP_OK;
}
release_held_new_jobs(
    cupsd_client_t  *con,		 
    ipp_attribute_t *uri)		 
{
  http_status_t		status;		 
  cups_ptype_t		dtype;		 
  cupsd_printer_t	*printer;	 


  cupsdLogMessage(CUPSD_LOG_DEBUG2, "release_held_new_jobs(%p[%d], %s)", con,
                  con->number, uri->values[0].string.text);

  

  if (!cupsdValidateDest(uri->values[0].string.text, &dtype, &printer))
  {
    

    send_ipp_status(con, IPP_NOT_FOUND,
                    _("The printer or class does not exist."));
    return;
  }

  

  if ((status = cupsdCheckPolicy(printer->op_policy_ptr, con, NULL)) != HTTP_OK)
  {
    send_http_error(con, status, printer);
    return;
  }

  

  printer->holding_new_jobs = 0;

  cupsdSetPrinterReasons(printer, "-hold-new-jobs");

  if (dtype & CUPS_PRINTER_CLASS)
    cupsdLogMessage(CUPSD_LOG_INFO,
                    "Class \"%s\" now printing pending/new jobs (\"%s\").",
                    printer->name, get_username(con));
  else
    cupsdLogMessage(CUPSD_LOG_INFO,
                    "Printer \"%s\" now printing pending/new jobs (\"%s\").",
                    printer->name, get_username(con));

  cupsdCheckJobs();

  

  con->response->request.status.status_code = IPP_OK;
}