From 5aa9ccc45d540caabfe488c3e78d5ac87719eb74 Mon Sep 17 00:00:00 2001 From: erickson Date: Tue, 8 Jul 2008 22:16:02 +0000 Subject: [PATCH] don't run the cleanup/shutdown code more than once per process git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1361 9efc2488-bf62-4759-914b-345cdb29e865 --- src/libopensrf/osrf_system.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libopensrf/osrf_system.c b/src/libopensrf/osrf_system.c index d2b8cb0..0e179ac 100644 --- a/src/libopensrf/osrf_system.c +++ b/src/libopensrf/osrf_system.c @@ -456,13 +456,16 @@ int osrf_system_disconnect_client( void ) { return 0; } +static int shutdownComplete = 0; int osrf_system_shutdown( void ) { + if(shutdownComplete) return; osrfConfigCleanup(); osrfCacheCleanup(); osrf_system_disconnect_client(); osrf_settings_free_host_config(NULL); osrfAppSessionCleanup(); osrfLogCleanup(); + shutdownComplete = 1; return 1; } -- 2.11.0