diff options
| author | Carl C. Trieloff <cctrieloff@apache.org> | 2008-11-06 16:00:22 +0000 |
|---|---|---|
| committer | Carl C. Trieloff <cctrieloff@apache.org> | 2008-11-06 16:00:22 +0000 |
| commit | e210a6d2d45f260fe9a711fc5266b749e6d045a5 (patch) | |
| tree | 741a692a9969594fc3f339a7102bd7563207fc78 /cpp/src/qpid/broker/Exchange.cpp | |
| parent | 2e987bf2b0c3f9318b28c79186a35f338c90ee6c (diff) | |
| download | qpid-python-e210a6d2d45f260fe9a711fc5266b749e6d045a5.tar.gz | |
Non fucntional changes
- move sequence count to args, so only store if set
- correct const-ness in fieldtable
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@711884 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/Exchange.cpp')
| -rw-r--r-- | cpp/src/qpid/broker/Exchange.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/cpp/src/qpid/broker/Exchange.cpp b/cpp/src/qpid/broker/Exchange.cpp index 243d089ccb..6a3fa88ff0 100644 --- a/cpp/src/qpid/broker/Exchange.cpp +++ b/cpp/src/qpid/broker/Exchange.cpp @@ -153,7 +153,7 @@ Exchange::shared_ptr Exchange::decode(ExchangeRegistry& exchanges, Buffer& buffe buffer.get(args); Exchange::shared_ptr exch = exchanges.declare(name, type, durable, args).first; - exch->sequenceNo = buffer.getInt64(); + exch->sequenceNo = args.getAsInt64("qpid.sequence_counter"); return exch; } @@ -162,8 +162,8 @@ void Exchange::encode(Buffer& buffer) const buffer.putShortString(name); buffer.putOctet(durable); buffer.putShortString(getType()); + if (sequenceNo) args.setInt64(std::string("qpid.sequence_counter"),sequenceNo); buffer.put(args); - buffer.putInt64(sequenceNo); } uint32_t Exchange::encodedSize() const @@ -171,8 +171,7 @@ uint32_t Exchange::encodedSize() const return name.size() + 1/*short string size*/ + 1 /*durable*/ + getType().size() + 1/*short string size*/ - + args.encodedSize() - + 8; /*int64 */ + + args.encodedSize(); } ManagementObject* Exchange::GetManagementObject (void) const |
