]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/globals.c
Merge changes from CUPS 1.4svn-r8606.
[thirdparty/cups.git] / cups / globals.c
index 3335e5163cdbeea4368ca726a7c383d608a6c0ea..e9e863313f00856616d6eb3f084e4dad113c0eed 100644 (file)
@@ -1,25 +1,16 @@
 /*
- * "$Id: globals.c 4967 2006-01-24 03:42:15Z mike $"
+ * "$Id: globals.c 7870 2008-08-27 18:14:10Z mike $"
  *
  *   Global variable access routines for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-2006 by Easy Software Products, all rights reserved.
+ *   Copyright 2007-2009 by Apple Inc.
+ *   Copyright 1997-2007 by Easy Software Products, all rights reserved.
  *
  *   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/".
  *
  *   This file is subject to the Apple OS-Developed Software exception.
  *
@@ -121,7 +112,7 @@ _cupsGlobals(void)
     */
 
     globals->encryption  = (http_encryption_t)-1;
-    globals->password_cb = _cupsGetPassword;
+    globals->password_cb = (cups_password_cb2_t)_cupsGetPassword;
 
     cups_env_init(globals);
   }
@@ -152,17 +143,32 @@ globals_init()
 static void
 globals_destructor(void *value)                /* I - Data to free */
 {
+  int                  i;              /* Looping var */
+  _ipp_buffer_t                *buffer,        /* Current IPP read/write buffer */
+                       *next;          /* Next buffer */
   _cups_globals_t      *cg;            /* Global data */
 
 
   cg = (_cups_globals_t *)value;
 
-  if (cg->http)
-    httpClose(cg->http);
+  httpClose(cg->http);
+
+  for (i = 0; i < 3; i ++)
+    cupsFileClose(cg->stdio_files[i]);
+
+  if (cg->last_status_message)
+    _cupsStrFree(cg->last_status_message);
+
+  cupsFreeOptions(cg->cupsd_num_settings, cg->cupsd_settings);
+
+  for (buffer = cg->ipp_buffers; buffer; buffer = next)
+  {
+    next = buffer->next;
+    free(buffer);
+  }
 
-  _cupsLangFlush(cg);
-  _cupsCharmapFlush(cg);
-  _cupsNormalizeMapsFlush(cg);
+  cupsArrayDelete(cg->pwg_size_lut);
+  cupsArrayDelete(cg->leg_size_lut);
 
   free(value);
 }
@@ -210,5 +216,5 @@ _cupsGlobals(void)
 
 
 /*
- * End of "$Id: globals.c 4967 2006-01-24 03:42:15Z mike $".
+ * End of "$Id: globals.c 7870 2008-08-27 18:14:10Z mike $".
  */