summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/qpid/Options.cpp2
-rw-r--r--cpp/src/qpid/framing/AMQContentBody.cpp4
-rw-r--r--cpp/src/qpid/framing/MethodHolder.cpp8
-rw-r--r--cpp/src/qpid/framing/SequenceNumberSet.cpp4
-rw-r--r--cpp/src/qpid/framing/amqp_types.h4
5 files changed, 11 insertions, 11 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.