summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/PreviewConnectionHandler.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2008-03-26 12:14:18 +0000
committerGordon Sim <gsim@apache.org>2008-03-26 12:14:18 +0000
commit9222ac0989bffebe53706255314fa4c577d2b6d8 (patch)
tree7b71d235c5c67fbe9c6d1e1c496194d52ce42102 /cpp/src/qpid/broker/PreviewConnectionHandler.cpp
parent7cc09e96c680aa54c9d988844604f4fa7328c770 (diff)
downloadqpid-python-9222ac0989bffebe53706255314fa4c577d2b6d8.tar.gz
Re-enable the establishment of inter-broker links.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@641281 13f79535-47bb-0310-9956-ffa450edef68
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*/)