[Opensrf-commits] r1090 - in trunk: include/opensrf src/libopensrf

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Sep 21 12:21:14 EDT 2007


Author: erickson
Date: 2007-09-21 12:12:07 -0400 (Fri, 21 Sep 2007)
New Revision: 1090

Modified:
   trunk/include/opensrf/osrf_cache.h
   trunk/src/libopensrf/osrf_cache.c
   trunk/src/libopensrf/osrf_system.c
Log:
added cache cleanup code

Modified: trunk/include/opensrf/osrf_cache.h
===================================================================
--- trunk/include/opensrf/osrf_cache.h	2007-09-02 17:36:15 UTC (rev 1089)
+++ trunk/include/opensrf/osrf_cache.h	2007-09-21 16:12:07 UTC (rev 1090)
@@ -80,3 +80,7 @@
 
 
 
+/**
+ * Clean up the global cache handles, etc.
+ */
+void osrfCacheCleanup();

Modified: trunk/src/libopensrf/osrf_cache.c
===================================================================
--- trunk/src/libopensrf/osrf_cache.c	2007-09-02 17:36:15 UTC (rev 1089)
+++ trunk/src/libopensrf/osrf_cache.c	2007-09-21 16:12:07 UTC (rev 1090)
@@ -96,4 +96,9 @@
 	return -1;
 }
 
+void osrfCacheCleanup() {
+    if(__osrfCache) 
+        mc_free(__osrfCache);
+}
 
+

Modified: trunk/src/libopensrf/osrf_system.c
===================================================================
--- trunk/src/libopensrf/osrf_system.c	2007-09-02 17:36:15 UTC (rev 1089)
+++ trunk/src/libopensrf/osrf_system.c	2007-09-21 16:12:07 UTC (rev 1090)
@@ -454,6 +454,7 @@
 
 int osrf_system_shutdown( void ) {
 	osrfConfigCleanup();
+    osrfCacheCleanup();
 	osrf_system_disconnect_client();
 	osrf_settings_free_host_config(NULL);
 	osrfAppSessionCleanup();



More information about the opensrf-commits mailing list