~ubuntu-branches/ubuntu/natty/cups/natty

« back to all changes in this revision

Viewing changes to cgi-bin/admin.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-09-15 11:30:07 UTC
  • mto: (12.1.3 sid) (14.1.1 sid) (25.1.2 lucid)
  • mto: This revision was merged to the branch mainline in revision 13.
  • Revision ID: james.westby@ubuntu.com-20090915113007-1gngzbskotfxronq
Tags: upstream-1.4.1
ImportĀ upstreamĀ versionĀ 1.4.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * "$Id: admin.c 8721 2009-06-18 21:41:05Z mike $"
 
2
 * "$Id: admin.c 8801 2009-08-29 06:05:14Z mike $"
3
3
 *
4
4
 *   Administration CGI for the Common UNIX Printing System (CUPS).
5
5
 *
634
634
    return;
635
635
  }
636
636
 
 
637
  if (!name)
 
638
  {
 
639
    cgiStartHTML(title);
 
640
    cgiSetVariable("ERROR", cgiText(_("Missing form variable!")));
 
641
    cgiCopyTemplateLang("error.tmpl");
 
642
    cgiEndHTML();
 
643
    return;
 
644
  }
 
645
 
637
646
  for (ptr = name; *ptr; ptr ++)
638
647
    if ((*ptr >= 0 && *ptr <= ' ') || *ptr == 127 || *ptr == '/' || *ptr == '#')
639
648
      break;
668
677
  request = ippNewRequest(CUPS_ADD_CLASS);
669
678
 
670
679
  httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL,
671
 
                   "localhost", 0, "/classes/%s",
672
 
                   cgiGetVariable("PRINTER_NAME"));
 
680
                   "localhost", 0, "/classes/%s", name);
673
681
  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
674
682
               NULL, uri);
675
683
 
4202
4210
 
4203
4211
 
4204
4212
/*
4205
 
 * End of "$Id: admin.c 8721 2009-06-18 21:41:05Z mike $".
 
4213
 * End of "$Id: admin.c 8801 2009-08-29 06:05:14Z mike $".
4206
4214
 */