activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject git commit: https://issues.apache.org/jira/browse/AMQCPP-515
Date Mon, 07 Oct 2013 13:53:39 GMT
Updated Branches:
  refs/heads/3.8.x eccc0f71e -> 8eaedcb3b


https://issues.apache.org/jira/browse/AMQCPP-515

Fix overwriting newer property values with older ones in Stomp.

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

Branch: refs/heads/3.8.x
Commit: 8eaedcb3b0e07d36153ec902887e643562646b59
Parents: eccc0f7
Author: Timothy Bish <tabish121@gmai.com>
Authored: Mon Oct 7 09:53:26 2013 -0400
Committer: Timothy Bish <tabish121@gmai.com>
Committed: Mon Oct 7 09:53:26 2013 -0400

----------------------------------------------------------------------
 .../src/main/activemq/wireformat/stomp/StompFrame.cpp         | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/8eaedcb3/activemq-cpp/src/main/activemq/wireformat/stomp/StompFrame.cpp
----------------------------------------------------------------------
diff --git a/activemq-cpp/src/main/activemq/wireformat/stomp/StompFrame.cpp b/activemq-cpp/src/main/activemq/wireformat/stomp/StompFrame.cpp
index 42918d2..511dc78 100644
--- a/activemq-cpp/src/main/activemq/wireformat/stomp/StompFrame.cpp
+++ b/activemq-cpp/src/main/activemq/wireformat/stomp/StompFrame.cpp
@@ -105,7 +105,6 @@ void StompFrame::toStream(decaf::io::DataOutputStream* stream) const {
     }
 
     if ((this->getBodyLength() == 0) || (this->getProperty(StompCommandConstants::HEADER_CONTENTLENGTH)
!= "")) {
-
         stream->write('\0');
     }
 
@@ -196,9 +195,7 @@ void StompFrame::readHeaders(decaf::io::DataInputStream* in) {
             // Check for an empty line to demark the end of the header section.
             // if its not the end then we have a header to process, so parse it.
             if (numChars == 1 && buffer[0] == '\0') {
-
                 endOfHeaders = true;
-
             } else {
 
                 // Search through this line to separate the key/value pair.
@@ -214,7 +211,9 @@ void StompFrame::readHeaders(decaf::io::DataInputStream* in) {
                         const char* value = reinterpret_cast<char*>(&buffer[ix
+ 1]);
 
                         // Assign the header key/value pair.
-                        this->getProperties().setProperty(key, value);
+                        if (!this->getProperties().hasProperty(key)) {
+                            this->getProperties().setProperty(key, value);
+                        }
 
                         // Break out of the for loop.
                         break;


Mime
View raw message