summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/amqp_0_10/Connection.cpp
diff options
context:
space:
mode:
authorKim van der Riet <kpvdr@apache.org>2013-02-28 16:14:30 +0000
committerKim van der Riet <kpvdr@apache.org>2013-02-28 16:14:30 +0000
commit9c73ef7a5ac10acd6a50d5d52bd721fc2faa5919 (patch)
tree2a890e1df09e5b896a9b4168a7b22648f559a1f2 /cpp/src/qpid/amqp_0_10/Connection.cpp
parent172d9b2a16cfb817bbe632d050acba7e31401cd2 (diff)
downloadqpid-python-asyncstore.tar.gz
Update from trunk r1375509 through r1450773asyncstore
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/asyncstore@1451244 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/amqp_0_10/Connection.cpp')
-rw-r--r--cpp/src/qpid/amqp_0_10/Connection.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/cpp/src/qpid/amqp_0_10/Connection.cpp b/cpp/src/qpid/amqp_0_10/Connection.cpp
index ceeaadf70c..5312c40f2a 100644
--- a/cpp/src/qpid/amqp_0_10/Connection.cpp
+++ b/cpp/src/qpid/amqp_0_10/Connection.cpp
@@ -74,14 +74,14 @@ bool Connection::isClosed() const {
return pushClosed && popClosed;
}
-size_t Connection::encode(const char* buffer, size_t size) {
+size_t Connection::encode(char* buffer, size_t size) {
{ // Swap frameQueue data into workQueue to avoid holding lock while we encode.
Mutex::ScopedLock l(frameQueueLock);
if (popClosed) return 0; // Can't pop any more frames.
assert(workQueue.empty());
workQueue.swap(frameQueue);
}
- framing::Buffer out(const_cast<char*>(buffer), size);
+ framing::Buffer out(buffer, size);
if (!isClient && !initialized) {
framing::ProtocolInitiation pi(getVersion());
pi.encode(out);
@@ -119,7 +119,6 @@ size_t Connection::encode(const char* buffer, size_t size) {
void Connection::abort() { output.abort(); }
void Connection::activateOutput() { output.activateOutput(); }
-void Connection::giveReadCredit(int32_t credit) { output.giveReadCredit(credit); }
void Connection::close() {
// No more frames can be pushed onto the queue.
@@ -146,10 +145,6 @@ framing::ProtocolVersion Connection::getVersion() const {
return version;
}
-void Connection::setVersion(const framing::ProtocolVersion& v) {
- version = v;
-}
-
size_t Connection::getBuffered() const {
Mutex::ScopedLock l(frameQueueLock);
return buffered;