qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject svn commit: r585968 - in /incubator/qpid/trunk/qpid/cpp/src/qpid/broker: SessionManager.cpp SessionManager.h SessionState.cpp
Date Thu, 18 Oct 2007 14:11:14 GMT
Author: gsim
Date: Thu Oct 18 07:11:14 2007
New Revision: 585968

URL: http://svn.apache.org/viewvc?rev=585968&view=rev
Log:
Lock active session id map when removing id for closed session.
 

Modified:
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionManager.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionManager.h
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.cpp

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionManager.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionManager.cpp?rev=585968&r1=585967&r2=585968&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionManager.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionManager.cpp Thu Oct 18 07:11:14 2007
@@ -82,6 +82,12 @@
     return state;
 }
 
+void SessionManager::erase(const framing::Uuid& id)
+{
+    Mutex::ScopedLock l(lock);
+    active.erase(id);
+}
+
 void SessionManager::eraseExpired() {
     // Called with lock held.
     if (!suspended.empty()) {

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionManager.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionManager.h?rev=585968&r1=585967&r2=585968&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionManager.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionManager.h Thu Oct 18 07:11:14 2007
@@ -67,6 +67,7 @@
     Suspended suspended;
     Active active;
 
+    void erase(const framing::Uuid&);             
     void eraseExpired();             
   friend class SessionState; // removes deleted sessions from active set.
 };

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.cpp?rev=585968&r1=585967&r2=585968&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.cpp Thu Oct 18 07:11:14 2007
@@ -49,7 +49,7 @@
 
 SessionState::~SessionState() {
     // Remove ID from active session list.
-    factory.active.erase(getId());
+    factory.erase(getId());
 }
 
 SessionHandler& SessionState::getHandler() {



Mime
View raw message