summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/PreviewConnection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid/broker/PreviewConnection.cpp')
-rw-r--r--cpp/src/qpid/broker/PreviewConnection.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/cpp/src/qpid/broker/PreviewConnection.cpp b/cpp/src/qpid/broker/PreviewConnection.cpp
index 5a541b5624..f5a629248c 100644
--- a/cpp/src/qpid/broker/PreviewConnection.cpp
+++ b/cpp/src/qpid/broker/PreviewConnection.cpp
@@ -85,17 +85,12 @@ public:
};
-PreviewConnection::PreviewConnection(ConnectionOutputHandler* out_, Broker& broker_, const std::string& mgmtId_) :
+PreviewConnection::PreviewConnection(ConnectionOutputHandler* out_, Broker& broker_, const std::string& mgmtId_, bool isLink) :
ConnectionState(out_, broker_),
- adapter(*this),
+ adapter(*this, isLink),
mgmtClosing(0),
mgmtId(mgmtId_)
{
- initMgmt();
-}
-
-void PreviewConnection::initMgmt(bool asLink)
-{
Manageable* parent = broker.GetVhostObject ();
if (parent != 0)
@@ -104,7 +99,7 @@ void PreviewConnection::initMgmt(bool asLink)
if (agent.get () != 0)
{
- if (asLink) {
+ if (isLink) {
mgmtWrapper = std::auto_ptr<MgmtWrapper>(new MgmtLink(this, parent, agent, mgmtId));
} else {
mgmtWrapper = std::auto_ptr<MgmtWrapper>(new MgmtClient(this, parent, agent, mgmtId));