qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tr...@apache.org
Subject svn commit: r811046 - in /qpid/trunk/qpid/cpp/src: qpid/broker/Link.cpp tests/federation.py
Date Thu, 03 Sep 2009 17:20:46 GMT
Author: tross
Date: Thu Sep  3 17:20:45 2009
New Revision: 811046

URL: http://svn.apache.org/viewvc?rev=811046&view=rev
Log:
QPID-2045 - crash when destroying a federation link with a dynamic bridge
Committed patch from Ken Guisti

Modified:
    qpid/trunk/qpid/cpp/src/qpid/broker/Link.cpp
    qpid/trunk/qpid/cpp/src/tests/federation.py

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/Link.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/Link.cpp?rev=811046&r1=811045&r2=811046&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/Link.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/Link.cpp Thu Sep  3 17:20:45 2009
@@ -200,8 +200,10 @@
 
         // Move the bridges to be deleted into a local vector so there is no
         // corruption of the iterator caused by bridge deletion.
-        for (Bridges::iterator i = active.begin(); i != active.end(); i++)
+        for (Bridges::iterator i = active.begin(); i != active.end(); i++) {
+            (*i)->closed();
             toDelete.push_back(*i);
+        }
         active.clear();
 
         for (Bridges::iterator i = created.begin(); i != created.end(); i++)

Modified: qpid/trunk/qpid/cpp/src/tests/federation.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/federation.py?rev=811046&r1=811045&r2=811046&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/federation.py (original)
+++ qpid/trunk/qpid/cpp/src/tests/federation.py Thu Sep  3 17:20:45 2009
@@ -573,8 +573,13 @@
 
         result = bridge.close()
         self.assertEqual(result.status, 0)
-        result = bridge2.close()
-        self.assertEqual(result.status, 0)
+        
+        # Extra test: don't explicitly close() bridge2.  When the link is closed,
+        # it should clean up bridge2 automagically.  verify_cleanup() will detect
+        # if bridge2 isn't cleaned up and will fail the test.
+        #
+        #result = bridge2.close()
+        #self.assertEqual(result.status, 0)
         result = link.close()
         self.assertEqual(result.status, 0)
 



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message