Backported child shutdown fix
authorScott Cantor <cantor.2@osu.edu>
Thu, 22 Jul 2004 18:57:10 +0000 (18:57 +0000)
committerScott Cantor <cantor.2@osu.edu>
Thu, 22 Jul 2004 18:57:10 +0000 (18:57 +0000)
shib-target/shib-config.cpp
shib-target/shib-rpchandle.cpp

index 3114315..9a0e17a 100644 (file)
@@ -178,8 +178,10 @@ void STConfig::shutdown()
     Category& log = Category::getInstance("shibtarget.STConfig");
     log.info("shutting down the library");
     delete m_tranLogLock;
+    m_tranLogLock = NULL;
     //delete m_tranLog; // This is crashing for some reason, but we're shutting down anyway.
     delete m_ini;
+    m_ini = NULL;
     ShibConfig::getConfig().term();
     SAMLConfig::getConfig().term();
     log.info("library shutdown complete");
index 4282787..c71d8e4 100644 (file)
@@ -88,9 +88,13 @@ void RPCHandle::disconnect()
         clnt_destroy(m_clnt);
         m_clnt=NULL;
         IConfig* conf=ShibTargetConfig::getConfig().getINI();
-        Locker locker(conf);
-        conf->getListener()->close(m_sock);
-        m_sock=(IListener::ShibSocket)0;
+        if (conf) {
+            Locker locker(conf);
+            conf->getListener()->close(m_sock);
+            m_sock=(IListener::ShibSocket)0;
+        }
+        else
+            m_sock=(IListener::ShibSocket)0;
     }
 }