diff options
author | Ted Ross <tross@apache.org> | 2012-01-27 20:03:54 +0000 |
---|---|---|
committer | Ted Ross <tross@apache.org> | 2012-01-27 20:03:54 +0000 |
commit | ab01c9c19e109b2f91cb505f53497592c52ca88d (patch) | |
tree | f949ccc109e8a9d9ef0959859615d7e181647105 /cpp/src/qpid | |
parent | 2dd2e994b81425235e42edbbad390c9d92a08b12 (diff) | |
download | qpid-python-ab01c9c19e109b2f91cb505f53497592c52ca88d.tar.gz |
QPID-3787 - Fixed shutdown crash in SslPlugin, Fixed problem with sasl_mux test.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1236864 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid')
-rw-r--r-- | cpp/src/qpid/sys/SslPlugin.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cpp/src/qpid/sys/SslPlugin.cpp b/cpp/src/qpid/sys/SslPlugin.cpp index ab15785492..48baef9042 100644 --- a/cpp/src/qpid/sys/SslPlugin.cpp +++ b/cpp/src/qpid/sys/SslPlugin.cpp @@ -96,10 +96,12 @@ typedef SslProtocolFactoryTmpl<SslMuxSocket> SslMuxProtocolFactory; // Static instance to initialise plugin static struct SslPlugin : public Plugin { SslServerOptions options; + bool nssInitialized; Options* getOptions() { return &options; } - ~SslPlugin() { ssl::shutdownNSS(); } + SslPlugin() : nssInitialized(false) {} + ~SslPlugin() { if (nssInitialized) ssl::shutdownNSS(); } void earlyInitialize(Target& target) { broker::Broker* broker = dynamic_cast<broker::Broker*>(&target); @@ -129,6 +131,7 @@ static struct SslPlugin : public Plugin { } else { try { ssl::initNSS(options, true); + nssInitialized = true; const broker::Broker::Options& opts = broker->getOptions(); |