diff options
| author | Gordon Sim <gsim@apache.org> | 2008-11-06 22:08:14 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2008-11-06 22:08:14 +0000 |
| commit | 2de0473cf8c64e06396c5f5e6a0cf8b5e982514e (patch) | |
| tree | e16cb5c31d3c6399e5e3eeb0f50b793d55b1ad13 /cpp/src/qpid/broker/Link.cpp | |
| parent | e1132d45340a4d1c91648cac856803428d2a60f4 (diff) | |
| download | qpid-python-2de0473cf8c64e06396c5f5e6a0cf8b5e982514e.tar.gz | |
Restrict connection close codes to the set defined in the spec
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@711989 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/Link.cpp')
| -rw-r--r-- | cpp/src/qpid/broker/Link.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cpp/src/qpid/broker/Link.cpp b/cpp/src/qpid/broker/Link.cpp index 4f9b8bc104..d2886050dd 100644 --- a/cpp/src/qpid/broker/Link.cpp +++ b/cpp/src/qpid/broker/Link.cpp @@ -26,6 +26,7 @@ #include "qpid/agent/ManagementAgent.h" #include "boost/bind.hpp" #include "qpid/log/Statement.h" +#include "qpid/framing/enum.h" #include "qpid/framing/reply_exceptions.h" #include "AclModule.h" @@ -33,6 +34,7 @@ using namespace qpid::broker; using qpid::framing::Buffer; using qpid::framing::FieldTable; using qpid::framing::NotAllowedException; +using qpid::framing::connection::CLOSE_CODE_CONNECTION_FORCED; using qpid::management::ManagementAgent; using qpid::management::ManagementObject; using qpid::management::Manageable; @@ -78,7 +80,7 @@ Link::Link(LinkRegistry* _links, Link::~Link () { if (state == STATE_OPERATIONAL && connection != 0) - connection->close(); + connection->close(CLOSE_CODE_CONNECTION_FORCED, "closed by management"); if (mgmtObject != 0) mgmtObject->resourceDestroy (); @@ -169,7 +171,7 @@ void Link::destroy () QPID_LOG (info, "Inter-broker link to " << host << ":" << port << " removed by management"); if (connection) - connection->close(403, "closed by management"); + connection->close(CLOSE_CODE_CONNECTION_FORCED, "closed by management"); setStateLH(STATE_CLOSED); |
