qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject svn commit: r1525878 - /qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/EncodedMessage.cpp
Date Tue, 24 Sep 2013 13:11:00 GMT
Author: gsim
Date: Tue Sep 24 13:10:59 2013
New Revision: 1525878

URL: http://svn.apache.org/r1525878
Log:
QPID-5168: less restrictive treatment of reply to addresses

Modified:
    qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/EncodedMessage.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/EncodedMessage.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/EncodedMessage.cpp?rev=1525878&r1=1525877&r2=1525878&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/EncodedMessage.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/EncodedMessage.cpp Tue Sep 24 13:10:59 2013
@@ -169,7 +169,15 @@ qpid::amqp::CharSequence EncodedMessage:
 
 void EncodedMessage::getReplyTo(qpid::messaging::Address& a) const
 {
-    a = qpid::messaging::Address(replyTo.str());
+    std::string rt = replyTo.str();
+    std::string::size_type i = rt.find('/');
+    if (i != std::string::npos && i > 0 && rt.find('/', i+1) == std::string::npos)
{
+        //handle <name>/<subject> special case
+        a.setName(rt.substr(0, i));
+        a.setSubject(rt.substr(i+1));
+    } else {
+        a.setName(rt);
+    }
 }
 void EncodedMessage::getSubject(std::string& s) const
 {



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message