You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2007/07/19 18:12:22 UTC

svn commit: r557672 - /incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp

Author: aconway
Date: Thu Jul 19 09:12:22 2007
New Revision: 557672

URL: http://svn.apache.org/viewvc?view=rev&rev=557672
Log:
Fix memory error that was crashing broker.

Modified:
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp?view=diff&rev=557672&r1=557671&r2=557672
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp Thu Jul 19 09:12:22 2007
@@ -56,7 +56,11 @@
     if (frame.getChannel() == 0) {
         adapter.handle(frame);
     } else {
-        getChannel((frame.getChannel())).in->handle(frame);
+        // Assign handler to new shared_ptr, as it may be erased
+        // from the map by handle() if frame is a ChannelClose.
+        // 
+        FrameHandler::Chain handler=getChannel((frame.getChannel())).in;
+        handler->handle(frame);
     }
 }