]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/globals.c
License change: Apache License, Version 2.0.
[thirdparty/cups.git] / cups / globals.c
index df742c4077754a1952f75447bf40dc6ac41594a0..e91d77900f20d25431775bbef6492b451d12c5c8 100644 (file)
@@ -1,29 +1,10 @@
 /*
- * "$Id$"
+ * Global variable access routines for CUPS.
  *
- *   Global variable access routines for CUPS.
+ * Copyright 2007-2015 by Apple Inc.
+ * Copyright 1997-2007 by Easy Software Products, all rights reserved.
  *
- *   Copyright 2007-2013 by Apple Inc.
- *   Copyright 1997-2007 by Easy Software Products, all rights reserved.
- *
- *   These coded instructions, statements, and computer programs are the
- *   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/".
- *
- *   This file is subject to the Apple OS-Developed Software exception.
- *
- * Contents:
- *
- *   _cupsGlobalLock()    - Lock the global mutex.
- *   _cupsGlobals()       - Return a pointer to thread local storage
- *   _cupsGlobalUnlock()  - Unlock the global mutex.
- *   DllMain()            - Main entry for library.
- *   cups_fix_path()      - Fix a file path to use forward slashes consistently.
- *   cups_globals_alloc() - Allocate and initialize global data.
- *   cups_globals_free()  - Free global data.
- *   cups_globals_init()  - Initialize environment variables.
+ * Licensed under Apache License v2.0.  See the file "LICENSE" for more information.
  */
 
 /*
@@ -37,7 +18,6 @@
  * Local globals...
  */
 
-
 #ifdef DEBUG
 static int             cups_global_index = 0;
                                        /* Next thread number */
@@ -216,9 +196,10 @@ cups_globals_alloc(void)
   memset(cg, 0, sizeof(_cups_globals_t));
   cg->encryption     = (http_encryption_t)-1;
   cg->password_cb    = (cups_password_cb2_t)_cupsGetPassword;
-  cg->any_root       = 1;
-  cg->expired_certs  = 1;
-  cg->validate_certs = 0;
+  cg->trust_first    = -1;
+  cg->any_root       = -1;
+  cg->expired_certs  = -1;
+  cg->validate_certs = -1;
 
 #ifdef DEBUG
  /*
@@ -361,7 +342,9 @@ cups_globals_free(_cups_globals_t *cg)      /* I - Pointer to global data */
 
   httpClose(cg->http);
 
+#ifdef HAVE_SSL
   _httpFreeCredentials(cg->tls_credentials);
+#endif /* HAVE_SSL */
 
   cupsFileClose(cg->stdio_files[0]);
   cupsFileClose(cg->stdio_files[1]);
@@ -389,8 +372,3 @@ cups_globals_init(void)
   pthread_key_create(&cups_globals_key, (void (*)(void *))cups_globals_free);
 }
 #endif /* HAVE_PTHREAD_H */
-
-
-/*
- * End of "$Id$".
- */