diff options
| author | Stefan Boberg <[email protected]> | 2021-09-16 22:50:34 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-09-16 22:50:34 +0200 |
| commit | a19e8f6b7ee753dcea58bb2b934553e5530b2161 (patch) | |
| tree | 4acf7192a8ffeb5eaa4ee1d875fd415cf0f7c571 /zenutil/include | |
| parent | clang-format (diff) | |
| download | zen-a19e8f6b7ee753dcea58bb2b934553e5530b2161.tar.xz zen-a19e8f6b7ee753dcea58bb2b934553e5530b2161.zip | |
Exposed session id in ZenServerState
Diffstat (limited to 'zenutil/include')
| -rw-r--r-- | zenutil/include/zenserverprocess.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/zenutil/include/zenserverprocess.h b/zenutil/include/zenserverprocess.h index b659f6e58..d1897d5e2 100644 --- a/zenutil/include/zenserverprocess.h +++ b/zenutil/include/zenserverprocess.h @@ -5,6 +5,7 @@ #include <zencore/enumflags.h> #include <zencore/logging.h> #include <zencore/thread.h> +#include <zencore/uid.h> #include <gsl/gsl-lite.hpp> @@ -106,9 +107,10 @@ public: FRIEND_ENUM_CLASS_FLAGS(FlagsEnum); - void Reset(); - void SignalShutdownRequest(); - bool AddSponsorProcess(uint32_t Pid); + zen::Oid GetSessionId() const { return zen::Oid::FromMemory(SessionId); } + void Reset(); + void SignalShutdownRequest(); + bool AddSponsorProcess(uint32_t Pid); }; static_assert(sizeof(ZenServerEntry) == 256); @@ -121,8 +123,8 @@ public: void Snapshot(std::function<void(const ZenServerEntry&)>&& Callback); private: - void* m_hMapFile = nullptr; - ZenServerEntry* m_Data; + void* m_hMapFile = nullptr; + ZenServerEntry* m_Data = nullptr; int m_MaxEntryCount = 131072 / sizeof(ZenServerEntry); ZenServerEntry* m_OurEntry = nullptr; }; |