diff options
author | Gordon Sim <gsim@apache.org> | 2007-09-21 10:39:36 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2007-09-21 10:39:36 +0000 |
commit | 03cd19556c261f43a8d95bd7d803c59bd488aeef (patch) | |
tree | c589afb8a7d83dc44c445fc44df7850d0bf01ae4 /cpp | |
parent | 75d71dd695da1612d8ff6768a1a4b8082b2d2d65 (diff) | |
download | qpid-python-03cd19556c261f43a8d95bd7d803c59bd488aeef.tar.gz |
Use octet each for class and method id (changed c++ and python)
Modified indexes in xml for message.empty, message.offset and the c++ cluster class
Fixed encoding for rfc1982-long-set in c++ and python (its a size not a count that is prepended)
Fixed minor typo in configuration option help string
Use session.open/close in python tests, handle session.closed
Commented out the response tag in session.close due to pythons ambiguity as to whether session.closed is a response or not
Disabled broker.test_closed_channel (due to above issue); broker behaves as expected but test fails; test_invalid_channel is safe enough for now.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@578053 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/qpid/Options.cpp | 2 | ||||
-rw-r--r-- | cpp/src/qpid/framing/AMQContentBody.cpp | 4 | ||||
-rw-r--r-- | cpp/src/qpid/framing/MethodHolder.cpp | 8 | ||||
-rw-r--r-- | cpp/src/qpid/framing/SequenceNumberSet.cpp | 4 | ||||
-rw-r--r-- | cpp/src/qpid/framing/amqp_types.h | 4 | ||||
-rw-r--r-- | cpp/xml/cluster.xml | 2 |
6 files changed, 12 insertions, 12 deletions
diff --git a/cpp/src/qpid/Options.cpp b/cpp/src/qpid/Options.cpp index 2b6cff44f6..081583f17e 100644 --- a/cpp/src/qpid/Options.cpp +++ b/cpp/src/qpid/Options.cpp @@ -98,7 +98,7 @@ CommonOptions::CommonOptions(const string& name) : Options(name) { addOptions() ("help,h", optValue(help), "Print help message.") ("version,v", optValue(version), "Print version information.") - ("config", optValue(config, "FILE"), "Configuation file."); + ("config", optValue(config, "FILE"), "Configuration file."); } } // namespace qpid diff --git a/cpp/src/qpid/framing/AMQContentBody.cpp b/cpp/src/qpid/framing/AMQContentBody.cpp index 176114ea0c..13491589c4 100644 --- a/cpp/src/qpid/framing/AMQContentBody.cpp +++ b/cpp/src/qpid/framing/AMQContentBody.cpp @@ -12,7 +12,7 @@ * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an -n * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. @@ -41,6 +41,6 @@ void qpid::framing::AMQContentBody::print(std::ostream& out) const { out << "content (" << size() << " bytes)"; #ifndef NDEBUG - out << " " << data.substr(0,10); + out << " " << data.substr(0,10) << "..."; #endif } diff --git a/cpp/src/qpid/framing/MethodHolder.cpp b/cpp/src/qpid/framing/MethodHolder.cpp index 691d556ade..78dd2bdcaf 100644 --- a/cpp/src/qpid/framing/MethodHolder.cpp +++ b/cpp/src/qpid/framing/MethodHolder.cpp @@ -41,14 +41,14 @@ const AMQMethodBody* MethodHolder::get() const { void MethodHolder::encode(Buffer& b) const { const AMQMethodBody* body = get(); - b.putShort(body->amqpClassId()); - b.putShort(body->amqpMethodId()); + b.putOctet(body->amqpClassId()); + b.putOctet(body->amqpMethodId()); body->encode(b); } void MethodHolder::decode(Buffer& b) { - ClassId c=b.getShort(); - MethodId m=b.getShort(); + ClassId c=b.getOctet(); + MethodId m=b.getOctet(); construct(c,m); get()->decode(b); } diff --git a/cpp/src/qpid/framing/SequenceNumberSet.cpp b/cpp/src/qpid/framing/SequenceNumberSet.cpp index 3bee5fb09a..f1c81e078b 100644 --- a/cpp/src/qpid/framing/SequenceNumberSet.cpp +++ b/cpp/src/qpid/framing/SequenceNumberSet.cpp @@ -25,7 +25,7 @@ using namespace qpid::framing; void SequenceNumberSet::encode(Buffer& buffer) const { - buffer.putShort(size()); + buffer.putShort(size() * 4); for (const_iterator i = begin(); i != end(); i++) { buffer.putLong(i->getValue()); } @@ -33,7 +33,7 @@ void SequenceNumberSet::encode(Buffer& buffer) const void SequenceNumberSet::decode(Buffer& buffer) { - uint16_t count = buffer.getShort(); + uint16_t count = (buffer.getShort() / 4); for (uint16_t i = 0; i < count; i++) { push_back(SequenceNumber(buffer.getLong())); } diff --git a/cpp/src/qpid/framing/amqp_types.h b/cpp/src/qpid/framing/amqp_types.h index b922d33dbc..a788fe36e4 100644 --- a/cpp/src/qpid/framing/amqp_types.h +++ b/cpp/src/qpid/framing/amqp_types.h @@ -45,8 +45,8 @@ using std::string; typedef uint8_t FrameType; typedef uint16_t ChannelId; typedef uint32_t BatchOffset; -typedef uint16_t ClassId; -typedef uint16_t MethodId; +typedef uint8_t ClassId; +typedef uint8_t MethodId; typedef uint16_t ReplyCode; // Types represented by classes. diff --git a/cpp/xml/cluster.xml b/cpp/xml/cluster.xml index 80cf80fc6b..bbdb501b80 100644 --- a/cpp/xml/cluster.xml +++ b/cpp/xml/cluster.xml @@ -22,7 +22,7 @@ <amqp major="0" minor="10" port="5672"> -<class name = "cluster" index = "301"> +<class name = "cluster" index = "201"> <doc>Qpid extension class to allow clustered brokers to communicate.</doc> |