[shibboleth-sp2] 09/18: Fixed crash during shutdown by putting RPC handle pool on the heap.
Ferenc Wágner
wferi-guest at moszumanska.debian.org
Tue Jan 26 21:29:30 UTC 2016
This is an automated email from the git hooks/post-receive script.
wferi-guest pushed a commit to annotated tag 1.2.1b
in repository shibboleth-sp2.
commit 8d81d3ae8688429cb72000e662a545ab63531443
Author: Scott Cantor <cantor.2 at osu.edu>
Date: Mon Jan 10 18:58:13 2005 +0000
Fixed crash during shutdown by putting RPC handle pool on the heap.
---
shib-target/internal.h | 6 +++---
shib-target/shib-config.cpp | 5 +++++
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/shib-target/internal.h b/shib-target/internal.h
index 9b33bc7..1eee2c1 100644
--- a/shib-target/internal.h
+++ b/shib-target/internal.h
@@ -164,17 +164,17 @@ namespace shibtarget {
class STConfig : public ShibTargetConfig
{
public:
- STConfig() : m_tranLog(NULL), m_tranLogLock(NULL) {}
+ STConfig() : m_tranLog(NULL), m_tranLogLock(NULL), m_rpcpool(NULL) {}
~STConfig() {}
bool init(const char* schemadir, const char* config);
void shutdown();
- RPCHandlePool& getRPCHandlePool() {return m_rpcpool;}
+ RPCHandlePool& getRPCHandlePool() {return *m_rpcpool;}
log4cpp::Category& getTransactionLog() { m_tranLogLock->lock(); return *m_tranLog; }
void releaseTransactionLog() { m_tranLogLock->unlock();}
private:
- RPCHandlePool m_rpcpool;
+ RPCHandlePool* m_rpcpool;
log4cpp::FixedContextCategory* m_tranLog;
shibboleth::Mutex* m_tranLogLock;
static IConfig* ShibTargetConfigFactory(const DOMElement* e);
diff --git a/shib-target/shib-config.cpp b/shib-target/shib-config.cpp
index 54e51a7..c00923f 100644
--- a/shib-target/shib-config.cpp
+++ b/shib-target/shib-config.cpp
@@ -186,10 +186,13 @@ bool STConfig::init(const char* schemadir, const char* config)
m_tranLog=new FixedContextCategory(SHIBTRAN_LOGCAT);
m_tranLog->info("opened transaction log");
m_tranLogLock = Mutex::create();
+
+ m_rpcpool = new RPCHandlePool;
}
catch (...) {
log.fatal("caught exception while loading/initializing configuration");
delete m_ini;
+ delete m_rpcpool;
shibConf.term();
samlConf.term();
return false;
@@ -205,6 +208,8 @@ void STConfig::shutdown()
saml::NDC ndc("shutdown");
Category& log = Category::getInstance("shibtarget.STConfig");
log.info("shutting down the library");
+ delete m_rpcpool;
+ m_rpcpool = NULL;
delete m_tranLogLock;
m_tranLogLock = NULL;
//delete m_tranLog; // This is crashing for some reason, but we're shutting down anyway.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-shibboleth/shibboleth-sp2.git
More information about the Pkg-shibboleth-devel
mailing list