diff options
author | Gordon Sim <gsim@apache.org> | 2007-07-19 08:27:36 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2007-07-19 08:27:36 +0000 |
commit | b87a1e9d27755e2f98792567c29a0625b92c8654 (patch) | |
tree | cb1232987efbfa1cc0ef8ec5e62b07b6b6c918b6 /cpp/src/qpid/framing/MethodContext.cpp | |
parent | dfe8a370b6580446cf970e27562ad0385178922f (diff) | |
download | qpid-python-b87a1e9d27755e2f98792567c29a0625b92c8654.tar.gz |
removed the need to pass MethodContext/RequestId through proxy and handler/adapter interfaces
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@557522 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/framing/MethodContext.cpp')
-rw-r--r-- | cpp/src/qpid/framing/MethodContext.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cpp/src/qpid/framing/MethodContext.cpp b/cpp/src/qpid/framing/MethodContext.cpp index 73af73f8e5..9dc42dcfd7 100644 --- a/cpp/src/qpid/framing/MethodContext.cpp +++ b/cpp/src/qpid/framing/MethodContext.cpp @@ -24,8 +24,11 @@ namespace qpid { namespace framing { RequestId MethodContext::getRequestId() const { - return boost::shared_polymorphic_downcast<AMQRequestBody>(methodBody) - ->getRequestId(); + if (methodBody->type() == REQUEST_BODY) { + return boost::shared_polymorphic_cast<AMQRequestBody>(methodBody)->getRequestId(); + } else { + return 0; + } } }} // namespace qpid::framing |