]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/testadmin.c
Fix more compiler warnings (Issue #5423)
[thirdparty/cups.git] / cups / testadmin.c
index 0f2e1d0c21556c186c5c44a1eb168869d8d5e00f..58424eae41e0daa6b99884109220afc646b349d0 100644 (file)
@@ -1,32 +1,10 @@
 /*
- * "$Id: testadmin.c 5240 2006-03-07 21:55:29Z mike $"
+ * 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.
  */
 
 /*
@@ -34,7 +12,7 @@
  */
 
 #include "adminutil.h"
-#include "string.h"
+#include "string-private.h"
 
 
 /*
@@ -62,7 +40,8 @@ main(int  argc,                               /* I - Number of command-line args */
   * 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...
@@ -70,10 +49,10 @@ main(int  argc,                             /* I - Number of command-line args */
 
   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);
@@ -91,7 +70,7 @@ main(int  argc,                               /* I - Number of command-line args */
   * 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);
@@ -122,8 +101,3 @@ show_settings(
     num_settings --;
   }
 }
-
-
-/*
- * End of "$Id: testadmin.c 5240 2006-03-07 21:55:29Z mike $".
- */