diff --git a/src/proc/mobject/placement-ref.hpp b/src/proc/mobject/placement-ref.hpp index d4a77549c..a1227ac66 100644 --- a/src/proc/mobject/placement-ref.hpp +++ b/src/proc/mobject/placement-ref.hpp @@ -204,7 +204,8 @@ namespace mobject { bool checkValidity () const { - return session::SessionServiceFetch::isRegisteredID (this->id_); + return session::SessionServiceFetch::isAccessible() // session interface opened? + && session::SessionServiceFetch::isRegisteredID (this->id_); } static void diff --git a/src/proc/mobject/session.hpp b/src/proc/mobject/session.hpp index 29b1248ac..d49a7397b 100644 --- a/src/proc/mobject/session.hpp +++ b/src/proc/mobject/session.hpp @@ -127,6 +127,9 @@ namespace mobject { class SessManager : private boost::noncopyable { public: + /** diagnostics: session interface opened? */ + virtual bool isUp () =0; + /** clear current session contents * without resetting overall session config. * Afterwards, the session will contain only one diff --git a/src/proc/mobject/session/scope-path.cpp b/src/proc/mobject/session/scope-path.cpp index f464cc7d9..d20ae4ce1 100644 --- a/src/proc/mobject/session/scope-path.cpp +++ b/src/proc/mobject/session/scope-path.cpp @@ -119,7 +119,7 @@ namespace session { /** constant \em invalid path token. Created by locating an invalid scope */ - const ScopePath ScopePath::INVALID = ScopePath(Scope()); + const ScopePath ScopePath::INVALID = ScopePath(Scope()); ///////////////////////TODO can this initialisation be deferred? it causes creation of an default session very early /** a \em valid path consists of more than just the root element. diff --git a/src/proc/mobject/session/sess-manager-impl.cpp b/src/proc/mobject/session/sess-manager-impl.cpp index 2ad161383..879802c94 100644 --- a/src/proc/mobject/session/sess-manager-impl.cpp +++ b/src/proc/mobject/session/sess-manager-impl.cpp @@ -91,6 +91,13 @@ namespace session { { } + + bool + SessManagerImpl::isUp () + { + return bool(pImpl_); + } + /** @note no transactional behaviour. * may succeed partial. */ diff --git a/src/proc/mobject/session/sess-manager-impl.hpp b/src/proc/mobject/session/sess-manager-impl.hpp index 22eb310bf..5a07d5ec1 100644 --- a/src/proc/mobject/session/sess-manager-impl.hpp +++ b/src/proc/mobject/session/sess-manager-impl.hpp @@ -51,6 +51,8 @@ namespace session { virtual void load () ; virtual void save () ; + virtual bool isUp () ; + public: /* ==== proc layer internal API ==== */ diff --git a/src/proc/mobject/session/session-service-fetch.hpp b/src/proc/mobject/session/session-service-fetch.hpp index 7745d7365..50f62c7c5 100644 --- a/src/proc/mobject/session/session-service-fetch.hpp +++ b/src/proc/mobject/session/session-service-fetch.hpp @@ -63,6 +63,8 @@ namespace session { public: static PlacementMO& resolveID (PlacementMO::ID const&) ; static bool isRegisteredID (PlacementMO::ID const&) ; + + static bool isAccessible() ; }; diff --git a/src/proc/mobject/session/session-services.cpp b/src/proc/mobject/session/session-services.cpp index 261e4ce4b..a8c2d55e4 100644 --- a/src/proc/mobject/session/session-services.cpp +++ b/src/proc/mobject/session/session-services.cpp @@ -33,6 +33,15 @@ namespace mobject { namespace session { + /** is the element-fetch service usable? + * Effectively this means: is the session up? + */ + bool + SessionServiceFetch::isAccessible () + { + return Session::current.isUp(); + } + /** verify the given placement-ID (hash) is valid, * by checking if it refers to a Placement instance * currently registered with the PlacementIndex of the