qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From astitc...@apache.org
Subject svn commit: r1559251 - in /qpid/trunk/qpid/cpp/src/qpid/framing: ProtocolVersion.cpp ProtocolVersion.h
Date Fri, 17 Jan 2014 20:58:19 GMT
Author: astitcher
Date: Fri Jan 17 20:58:18 2014
New Revision: 1559251

URL: http://svn.apache.org/r1559251
Log:
QPID-5488: Fix Amqp protocol version printing

Modified:
    qpid/trunk/qpid/cpp/src/qpid/framing/ProtocolVersion.cpp
    qpid/trunk/qpid/cpp/src/qpid/framing/ProtocolVersion.h

Modified: qpid/trunk/qpid/cpp/src/qpid/framing/ProtocolVersion.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/framing/ProtocolVersion.cpp?rev=1559251&r1=1559250&r2=1559251&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/framing/ProtocolVersion.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/framing/ProtocolVersion.cpp Fri Jan 17 20:58:18 2014
@@ -26,7 +26,7 @@ using namespace qpid::framing;
 const std::string ProtocolVersion::toString() const
 {
     std::stringstream ss;
-    ss << major_ << "-" << minor_;
+    ss << unsigned(major_) << "-" << unsigned(minor_);
     if (major_ == 1) {
         if (protocol_ == SASL) ss << " (SASL)";
         else if (protocol_ == TLS) ss << " (TLS)";
@@ -46,7 +46,7 @@ bool ProtocolVersion::operator==(Protoco
     return major_ == p.major_ && minor_ == p.minor_;
 }
 
-uint8_t ProtocolVersion::AMQP(0);
-uint8_t ProtocolVersion::LEGACY_AMQP(1);
-uint8_t ProtocolVersion::TLS(2);
-uint8_t ProtocolVersion::SASL(3);
+const uint8_t ProtocolVersion::AMQP(0);
+const uint8_t ProtocolVersion::LEGACY_AMQP(1);
+const uint8_t ProtocolVersion::TLS(2);
+const uint8_t ProtocolVersion::SASL(3);

Modified: qpid/trunk/qpid/cpp/src/qpid/framing/ProtocolVersion.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/framing/ProtocolVersion.h?rev=1559251&r1=1559250&r2=1559251&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/framing/ProtocolVersion.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/framing/ProtocolVersion.h Fri Jan 17 20:58:18 2014
@@ -54,10 +54,10 @@ public:
 
     QPID_COMMON_EXTERN bool operator==(ProtocolVersion p) const;
     QPID_COMMON_INLINE_EXTERN bool operator!=(ProtocolVersion p) const { return ! (*this
== p); }
-    QPID_COMMON_EXTERN static uint8_t AMQP;
-    QPID_COMMON_EXTERN static uint8_t LEGACY_AMQP;
-    QPID_COMMON_EXTERN static uint8_t TLS;
-    QPID_COMMON_EXTERN static uint8_t SASL;
+    QPID_COMMON_EXTERN static const uint8_t AMQP;
+    QPID_COMMON_EXTERN static const uint8_t LEGACY_AMQP;
+    QPID_COMMON_EXTERN static const uint8_t TLS;
+    QPID_COMMON_EXTERN static const uint8_t SASL;
 };
 
 } // namespace framing



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


Mime
View raw message