gmime r1223 - in trunk: . gmime



Author: fejj
Date: Wed Feb 27 05:04:41 2008
New Revision: 1223
URL: http://svn.gnome.org/viewvc/gmime?rev=1223&view=rev

Log:
fixed ChangeLog

Modified:
   trunk/ChangeLog
   trunk/gmime/gmime-iconv.c

Modified: trunk/gmime/gmime-iconv.c
==============================================================================
--- trunk/gmime/gmime-iconv.c	(original)
+++ trunk/gmime/gmime-iconv.c	Wed Feb 27 05:04:41 2008
@@ -154,6 +154,21 @@
 }
 
 
+static void
+iconv_open_node_free (gpointer key, gpointer value, gpointer user_data)
+{
+	iconv_t cd = (iconv_t) key;
+	IconvCacheNode *node;
+	
+	node = (IconvCacheNode *) cache_node_lookup (iconv_cache, value, FALSE);
+	g_assert (node);
+	
+	if (cd != node->cd) {
+		node->refcount--;
+		iconv_close (cd);
+	}
+}
+
 
 /**
  * g_mime_iconv_shutdown:
@@ -173,11 +188,13 @@
 	fprintf (stderr, "The following %d iconv cache buckets are still open:\n", iconv_cache->size);
 	shutdown = 1;
 #endif
-	cache_free (iconv_cache);
-	iconv_cache = NULL;
 	
+	g_hash_table_foreach (iconv_open_hash, iconv_open_node_free, NULL);
 	g_hash_table_destroy (iconv_open_hash);
 	iconv_open_hash = NULL;
+	
+	cache_free (iconv_cache);
+	iconv_cache = NULL;
 }
 
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]