summaryrefslogtreecommitdiff
path: root/qpid/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/cpp')
-rw-r--r--qpid/cpp/src/qpid/broker/ConnectionHandler.cpp14
-rw-r--r--qpid/cpp/src/qpid/broker/ConnectionHandler.h3
2 files changed, 9 insertions, 8 deletions
diff --git a/qpid/cpp/src/qpid/broker/ConnectionHandler.cpp b/qpid/cpp/src/qpid/broker/ConnectionHandler.cpp
index eece59d095..8972040be5 100644
--- a/qpid/cpp/src/qpid/broker/ConnectionHandler.cpp
+++ b/qpid/cpp/src/qpid/broker/ConnectionHandler.cpp
@@ -242,17 +242,17 @@ void ConnectionHandler::Handler::open(const string& /*virtualHost*/,
AclModule* acl = connection.getBroker().getAcl();
if (acl && acl->userAclRules()) {
if (!acl->authorise(connection.getUserId(),acl::ACT_CREATE,acl::OBJ_LINK,"")){
- proxy.close(framing::connection::CLOSE_CODE_CONNECTION_FORCED,
- QPID_MSG("ACL denied " << connection.getUserId()
- << " creating a federation link"));
+ connection.close(framing::connection::CLOSE_CODE_CONNECTION_FORCED,
+ QPID_MSG("ACL denied " << connection.getUserId()
+ << " creating a federation link"));
return;
}
} else {
if (connection.getBroker().isAuthenticating()) {
- proxy.close(framing::connection::CLOSE_CODE_CONNECTION_FORCED,
- QPID_MSG("User " << connection.getUserId()
- << " federation connection denied. Systems with authentication "
- "enabled must specify ACL create link rules."));
+ connection.close(framing::connection::CLOSE_CODE_CONNECTION_FORCED,
+ QPID_MSG("User " << connection.getUserId()
+ << " federation connection denied. Systems with authentication "
+ "enabled must specify ACL create link rules."));
return;
}
}
diff --git a/qpid/cpp/src/qpid/broker/ConnectionHandler.h b/qpid/cpp/src/qpid/broker/ConnectionHandler.h
index 7af2fe3cb4..30155fb903 100644
--- a/qpid/cpp/src/qpid/broker/ConnectionHandler.h
+++ b/qpid/cpp/src/qpid/broker/ConnectionHandler.h
@@ -100,13 +100,14 @@ class ConnectionHandler : public framing::FrameHandler
std::auto_ptr<Handler> handler;
bool handle(const qpid::framing::AMQMethodBody& method);
+ void close(framing::connection::CloseCode code, const std::string& text);
public:
ConnectionHandler(amqp_0_10::Connection& connection, bool isClient );
- void close(framing::connection::CloseCode code, const std::string& text);
void heartbeat();
void handle(framing::AMQFrame& frame);
void setSecureConnection(SecureConnection* secured);
bool isOpen() { return handler->isOpen; }
+ friend class amqp_0_10::Connection;
};