/*
- * "$Id: testadmin.c 177 2006-06-21 00:20:03Z jlovell $"
+ * Admin function test program for CUPS.
*
- * Admin function test program for the Common UNIX Printing System (CUPS).
+ * Copyright 2007-2013 by Apple Inc.
+ * Copyright 2006 by Easy Software Products.
*
- * Copyright 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
- *
- * This file is subject to the Apple OS-Developed Software exception.
- *
- * Contents:
- *
- * main() - Main entry.
- * show_settings() - Show settings in the array...
+ * Licensed under Apache License v2.0. See the file "LICENSE" for more information.
*/
/*
*/
#include "adminutil.h"
-#include "string.h"
+#include "string-private.h"
/*
* Connect to the server using the defaults...
*/
- http = httpConnectEncrypt(cupsServer(), ippPort(), cupsEncryption());
+ http = httpConnect2(cupsServer(), ippPort(), NULL, AF_UNSPEC,
+ cupsEncryption(), 1, 30000, NULL);
/*
* Set the current configuration if we have anything on the command-line...
if (argc > 1)
{
- for (i = 1, num_settings = 0; i < argc; i ++)
+ for (i = 1, num_settings = 0, settings = NULL; i < argc; i ++)
num_settings = cupsParseOptions(argv[i], num_settings, &settings);
- if (_cupsAdminSetServerSettings(http, num_settings, settings))
+ if (cupsAdminSetServerSettings(http, num_settings, settings))
{
puts("New server settings:");
cupsFreeOptions(num_settings, settings);
* Get the current configuration...
*/
- if (_cupsAdminGetServerSettings(http, &num_settings, &settings))
+ if (cupsAdminGetServerSettings(http, &num_settings, &settings))
{
show_settings(num_settings, settings);
cupsFreeOptions(num_settings, settings);
num_settings --;
}
}
-
-
-/*
- * End of "$Id: testadmin.c 177 2006-06-21 00:20:03Z jlovell $".
- */