From 9222ac0989bffebe53706255314fa4c577d2b6d8 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Wed, 26 Mar 2008 12:14:18 +0000 Subject: 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 --- cpp/src/qpid/broker/PreviewConnectionHandler.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'cpp/src/qpid/broker/PreviewConnectionHandler.cpp') 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*/) -- cgit v1.2.1