activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject git commit: fix for: https://issues.apache.org/jira/browse/AMQCPP-510
Date Tue, 01 Oct 2013 22:05:45 GMT
Updated Branches:
  refs/heads/trunk 021798b68 -> c4c4602b4


fix for: https://issues.apache.org/jira/browse/AMQCPP-510

patches the problem on 3.8.x branch


Project: http://git-wip-us.apache.org/repos/asf/activemq-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-cpp/commit/c4c4602b
Tree: http://git-wip-us.apache.org/repos/asf/activemq-cpp/tree/c4c4602b
Diff: http://git-wip-us.apache.org/repos/asf/activemq-cpp/diff/c4c4602b

Branch: refs/heads/trunk
Commit: c4c4602b407991b64dec9ebd49410406435b9a3d
Parents: 021798b
Author: Timothy Bish <tabish121@gmai.com>
Authored: Tue Sep 10 17:15:46 2013 -0400
Committer: Timothy Bish <tabish121@gmai.com>
Committed: Tue Oct 1 17:46:35 2013 -0400

----------------------------------------------------------------------
 activemq-cpp/src/main/activemq/core/ConnectionAudit.cpp     | 6 ++++--
 activemq-cpp/src/test/activemq/core/ConnectionAuditTest.cpp | 5 +++--
 2 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/c4c4602b/activemq-cpp/src/main/activemq/core/ConnectionAudit.cpp
----------------------------------------------------------------------
diff --git a/activemq-cpp/src/main/activemq/core/ConnectionAudit.cpp b/activemq-cpp/src/main/activemq/core/ConnectionAudit.cpp
index d3be4ee..b8e3c5e 100644
--- a/activemq-cpp/src/main/activemq/core/ConnectionAudit.cpp
+++ b/activemq-cpp/src/main/activemq/core/ConnectionAudit.cpp
@@ -18,6 +18,7 @@
 #include "ConnectionAudit.h"
 
 #include <decaf/util/LinkedHashMap.h>
+#include <decaf/util/StlMap.h>
 
 #include <activemq/core/Dispatcher.h>
 #include <activemq/core/ActiveMQMessageAudit.h>
@@ -48,10 +49,11 @@ namespace core {
     public:
 
         Mutex mutex;
-        LinkedHashMap<Pointer<ActiveMQDestination>, Pointer<ActiveMQMessageAudit>
> destinations;
+
+        StlMap<Pointer<ActiveMQDestination>, Pointer<ActiveMQMessageAudit>,
ActiveMQDestination::COMPARATOR> destinations;
         LinkedHashMap<Dispatcher*, Pointer<ActiveMQMessageAudit> > dispatchers;
 
-        ConnectionAuditImpl() : mutex(), destinations(1000), dispatchers(1000) {
+        ConnectionAuditImpl() : mutex(), destinations(), dispatchers(1000) {
         }
     };
 }}

http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/c4c4602b/activemq-cpp/src/test/activemq/core/ConnectionAuditTest.cpp
----------------------------------------------------------------------
diff --git a/activemq-cpp/src/test/activemq/core/ConnectionAuditTest.cpp b/activemq-cpp/src/test/activemq/core/ConnectionAuditTest.cpp
index 2ba97a1..4e39df3 100644
--- a/activemq-cpp/src/test/activemq/core/ConnectionAuditTest.cpp
+++ b/activemq-cpp/src/test/activemq/core/ConnectionAuditTest.cpp
@@ -94,11 +94,12 @@ void ConnectionAuditTest::testIsDuplicate() {
     pid->setSessionId(0);
     pid->setValue(1);
 
-    Pointer<ActiveMQDestination> destination(new ActiveMQQueue("TEST.QUEUE"));
     Pointer<Message> message(new Message());
-    message->setDestination(destination);
 
     for (int i = 0; i < count; i++) {
+        Pointer<ActiveMQDestination> destination(new ActiveMQQueue("TEST.QUEUE"));
+        message->setDestination(destination);
+
         Pointer<MessageId> id(new MessageId);
         id->setProducerId(pid);
         id->setProducerSequenceId(i);


Mime
View raw message