]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - systemv/accept.c
Merge changes from CUPS 1.4svn-r7961.
[thirdparty/cups.git] / systemv / accept.c
index 6689eb6b5ef24bbab40f070cddfc9c4acc498bd5..367f38f8d5ccb76228e528af4fdbd4698c4ebbb3 100644 (file)
@@ -1,26 +1,17 @@
 /*
- * "$Id: accept.c 177 2006-06-21 00:20:03Z jlovell $"
+ * "$Id: accept.c 7929 2008-09-10 22:23:59Z mike $"
  *
  *   "accept", "disable", "enable", and "reject" commands for the Common
  *   UNIX Printing System (CUPS).
  *
+ *   Copyright 2007-2008 by Apple Inc.
  *   Copyright 1997-2006 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
- *   property of Easy Software Products and are protected by Federal
- *   copyright law.  Distribution and use rights are outlined in the file
- *   "LICENSE.txt" which should have been included with this file.  If this
- *   file is missing or damaged please contact Easy Software Products
- *   at:
- *
- *       Attn: CUPS Licensing Information
- *       Easy Software Products
- *       44141 Airport View Drive, Suite 204
- *       Hollywood, Maryland 20636 USA
- *
- *       Voice: (301) 373-9600
- *       EMail: cups-info@cups.org
- *         WWW: http://www.cups.org
+ *   property of Apple Inc. and are protected by Federal copyright
+ *   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+ *   which should have been included with this file.  If this file is
+ *   file is missing or damaged, see the license at "http://www.cups.org/".
  *
  * Contents:
  *
@@ -58,6 +49,8 @@ main(int  argc,                               /* I - Number of command-line arguments */
   int          cancel;                 /* Cancel jobs? */
 
 
+  _cupsSetLocale(argv);
+
  /*
   * See what operation we're supposed to do...
   */
@@ -69,9 +62,9 @@ main(int  argc,                               /* I - Number of command-line arguments */
 
   cancel = 0;
 
-  if (!strcmp(command, "accept"))
+  if (!strcmp(command, "cupsaccept") || !strcmp(command, "accept"))
     op = CUPS_ACCEPT_JOBS;
-  else if (!strcmp(command, "reject"))
+  else if (!strcmp(command, "cupsreject") || !strcmp(command, "reject"))
     op = CUPS_REJECT_JOBS;
   else if (!strcmp(command, "cupsdisable") || !strcmp(command, "disable"))
     op = IPP_PAUSE_PRINTER;
@@ -132,8 +125,11 @@ main(int  argc,                            /* I - Number of command-line arguments */
            break;
 
         case 'h' : /* Connect to host */
-           if (http != NULL)
+           if (http)
+           {
              httpClose(http);
+             http = NULL;
+           }
 
            if (argv[i][2] != '\0')
              cupsSetServer(argv[i] + 2);
@@ -286,5 +282,5 @@ main(int  argc,                             /* I - Number of command-line arguments */
 
 
 /*
- * End of "$Id: accept.c 177 2006-06-21 00:20:03Z jlovell $".
+ * End of "$Id: accept.c 7929 2008-09-10 22:23:59Z mike $".
  */