qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject svn commit: r1535427 - /qpid/trunk/qpid/cpp/src/qpid/messaging/MessageImpl.cpp
Date Thu, 24 Oct 2013 16:14:49 GMT
Author: gsim
Date: Thu Oct 24 16:14:49 2013
New Revision: 1535427

URL: http://svn.apache.org/r1535427
Log:
QPID-5256: check type before assuming it is string

Modified:
    qpid/trunk/qpid/cpp/src/qpid/messaging/MessageImpl.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/messaging/MessageImpl.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/messaging/MessageImpl.cpp?rev=1535427&r1=1535426&r2=1535427&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/messaging/MessageImpl.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/messaging/MessageImpl.cpp Thu Oct 24 16:14:49 2013
@@ -196,13 +196,13 @@ const std::string& MessageImpl::getBytes
         encoded->getBody(bytes, content);
         contentDecoded = true;
     }
-    if (bytes.empty() && !content.isVoid()) return content.getString();
+    if (bytes.empty() && content.getType() == VAR_STRING) return content.getString();
     else return bytes;
 }
 std::string& MessageImpl::getBytes()
 {
     updated();//have to assume body may be edited, invalidating our message
-    if (bytes.empty() && !content.isVoid()) return content.getString();
+    if (bytes.empty() && content.getType() == VAR_STRING) return content.getString();
     else return bytes;
 }
 



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


Mime
View raw message