summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/amqp_0_10/Connection.cpp
diff options
context:
space:
mode:
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;