diff options
author | Alan Conway <aconway@apache.org> | 2012-01-17 17:03:35 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2012-01-17 17:03:35 +0000 |
commit | b8af549de90bd1872e123c10c3b49045e5ab3fbc (patch) | |
tree | 1c6e33e127c6b0d66cdfcbe1ac550595a1e07cb0 | |
parent | b02ce1814786bbeabbc9070f5022ecc660b4d5b5 (diff) | |
download | qpid-python-b8af549de90bd1872e123c10c3b49045e5ab3fbc.tar.gz |
QPID-3603: Do case-insensitive string comparison for replication levels.
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/qpid-3603@1232480 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | qpid/cpp/src/qpid/ha/BrokerReplicator.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp b/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp index 7fd224d753..a496ab7583 100644 --- a/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp +++ b/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp @@ -35,6 +35,7 @@ #include "qmf/org/apache/qpid/broker/EventQueueDeclare.h" #include "qmf/org/apache/qpid/broker/EventQueueDelete.h" #include "qmf/org/apache/qpid/broker/EventSubscribe.h" +#include <algorithm> namespace qpid { namespace ha { @@ -115,9 +116,11 @@ const string S_WIRING="wiring"; const string S_ALL="all"; ReplicateLevel replicateLevel(const string& str) { + string value(str.size(), '\0'); + transform(str.begin(), str.end(), value.begin(), &tolower); ReplicateLevel rl = RL_NONE; - if (str == S_WIRING) rl = RL_WIRING; - else if (str == S_ALL) rl = RL_ALL; + if (value == S_WIRING) rl = RL_WIRING; + else if (value == S_ALL) rl = RL_ALL; return rl; } |