summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/PreviewConnectionHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid/broker/PreviewConnectionHandler.cpp')
-rw-r--r--cpp/src/qpid/broker/PreviewConnectionHandler.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/cpp/src/qpid/broker/PreviewConnectionHandler.cpp b/cpp/src/qpid/broker/PreviewConnectionHandler.cpp
index 0052b0d588..78ea2f5523 100644
--- a/cpp/src/qpid/broker/PreviewConnectionHandler.cpp
+++ b/cpp/src/qpid/broker/PreviewConnectionHandler.cpp
@@ -60,12 +60,16 @@ void PreviewConnectionHandler::handle(framing::AMQFrame& frame)
}
}
-PreviewConnectionHandler::PreviewConnectionHandler(PreviewConnection& connection) : handler(new Handler(connection)) {
+PreviewConnectionHandler::PreviewConnectionHandler(PreviewConnection& connection, bool isClient) : handler(new Handler(connection)) {
FieldTable properties;
string mechanisms(PLAIN);
string locales(en_US);
- handler->serverMode = true;
- handler->client.start(0, 10, properties, mechanisms, locales);
+ if (isClient) {
+ handler->serverMode = false;
+ }else {
+ handler->serverMode = true;
+ handler->client.start(99, 0, properties, mechanisms, locales);
+ }
}
PreviewConnectionHandler::Handler:: Handler(PreviewConnection& c) : client(c.getOutput()), server(c.getOutput()),
@@ -128,7 +132,6 @@ void PreviewConnectionHandler::Handler::start(uint8_t /*versionMajor*/,
string pwd = "qpidd";
string response = ((char)0) + uid + ((char)0) + pwd;
server.startOk(FieldTable(), PLAIN, response, en_US);
- connection.initMgmt(true);
}
void PreviewConnectionHandler::Handler::secure(const string& /*challenge*/)