You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by mg...@apache.org on 2010/05/25 00:56:41 UTC
svn commit: r947850 - in /qpid/trunk/qpid/cpp/src:
qpid/broker/SaslAuthenticator.cpp tests/cluster_authentication_soak.cpp
Author: mgoulish
Date: Mon May 24 22:56:40 2010
New Revision: 947850
URL: http://svn.apache.org/viewvc?rev=947850&view=rev
Log:
Disable new sasl testing if SASL version is less than 2.1.22.
Earlier version do not have SASL_PATH_TYPE_CONFIG, which this testing requires.
Modified:
qpid/trunk/qpid/cpp/src/qpid/broker/SaslAuthenticator.cpp
qpid/trunk/qpid/cpp/src/tests/cluster_authentication_soak.cpp
Modified: qpid/trunk/qpid/cpp/src/qpid/broker/SaslAuthenticator.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/SaslAuthenticator.cpp?rev=947850&r1=947849&r2=947850&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/SaslAuthenticator.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/SaslAuthenticator.cpp Mon May 24 22:56:40 2010
@@ -98,6 +98,8 @@ void SaslAuthenticator::init(const std::
int code;
// If we are not given a specific sasl path, do
// nothing and allow the default to be used.
+ // If we have a version of SASL in which SASL_PATH_TYPE_CONFIG does not yet exist, do nothing.
+ #if (SASL_VERSION_MAJOR >= 2) && (SASL_VERSION_MINOR >= 1) && (SASL_VERSION_STEP >= 22)
if ( ! saslConfigPath.empty() ) {
if(SASL_OK != (code=sasl_set_path(SASL_PATH_TYPE_CONFIG, const_cast<char *>(saslConfigPath.c_str())))) {
QPID_LOG(error, "SASL: sasl_set_path: [" << code << "] " );
@@ -105,6 +107,7 @@ void SaslAuthenticator::init(const std::
}
QPID_LOG(info, "SASL: config path set to " << saslConfigPath );
}
+ #endif
code = sasl_server_init(NULL, saslName.c_str());
if (code != SASL_OK) {
Modified: qpid/trunk/qpid/cpp/src/tests/cluster_authentication_soak.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/cluster_authentication_soak.cpp?rev=947850&r1=947849&r2=947850&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/cluster_authentication_soak.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/cluster_authentication_soak.cpp Mon May 24 22:56:40 2010
@@ -241,6 +241,11 @@ using namespace qpid::tests;
int
main ( int argc, char ** argv )
{
+ // I need the SASL_PATH_TYPE_CONFIG feature, which did not appear until SASL 2.1.22
+ #if (SASL_VERSION_MAJOR < 2) || (SASL_VERSION_MINOR < 1) || (SASL_VERSION_STEP < 22)
+ return 0;
+ #endif
+
int n_iterations = argc > 1 ? atoi(argv[1]) : 1;
runSilent = argc > 2 ? atoi(argv[2]) : 1; // default to silent
int killBroker = argc > 3 ? atoi(argv[3]) : 0; // Force the kill of one broker.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org