/*
- * "$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:
*
int cancel; /* Cancel jobs? */
+ _cupsSetLocale(argv);
+
/*
* See what operation we're supposed to do...
*/
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;
break;
case 'h' : /* Connect to host */
- if (http != NULL)
+ if (http)
+ {
httpClose(http);
+ http = NULL;
+ }
if (argv[i][2] != '\0')
cupsSetServer(argv[i] + 2);
/*
- * 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 $".
*/