diff --git a/src/remote/pv/security.h b/src/remote/pv/security.h index 87cab62..b60bb27 100644 --- a/src/remote/pv/security.h +++ b/src/remote/pv/security.h @@ -290,7 +290,7 @@ public: private: typedef std::map map_t; map_t map; - void *busy; + size_t busy; mutable epicsMutex mutex; public: diff --git a/src/remote/security.cpp b/src/remote/security.cpp index 5838028..c3028d1 100644 --- a/src/remote/security.cpp +++ b/src/remote/security.cpp @@ -289,12 +289,11 @@ bool AuthorizationRegistry::remove(const AuthorizationPlugin::shared_pointer& pl void AuthorizationRegistry::run(const std::tr1::shared_ptr& peer) { - int marker; { Guard G(mutex); if(busy) throw std::runtime_error("AuthorizationRegistry busy"); - busy = ▮ + busy++; } for(map_t::iterator it(map.begin()), end(map.end()); it!=end; ++it) { @@ -302,8 +301,8 @@ void AuthorizationRegistry::run(const std::tr1::shared_ptr& peer) } { Guard G(mutex); - assert(busy==&marker); - busy = 0; + assert(busy>=0); + busy--; } }