Loading src/authdb.cpp +10 −1 Changes for src/authdb.cpp: 10 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -79,7 +79,7 @@ namespace authdb { PluginManager *g_PluginManager = nullptr; class Client AuthClient; class Session AuthSession; Session *AuthSession = nullptr; std::mutex g_wizzard; Loading Loading @@ -667,6 +667,15 @@ int main(int argc,char *argv[]){ << " with " << ccfg.peers.size() << " peer(s)" << std::endl; } // Instantiate session store: cluster-aware or local-only std::unique_ptr<authdb::Session> sessionStore; if (clusterEnabled) { sessionStore = std::make_unique<authdb::ClusterSession>(); } else { sessionStore = std::make_unique<authdb::LocalSession>(); } authdb::AuthSession = sessionStore.get(); authdb::AuthBackend backend( clusterEnabled ? authdb::AuthBackendType::ClusterStore : authdb::AuthBackendType::File, backendPath, Loading src/authdb.h +1 −1 Changes for src/authdb.h: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -47,7 +47,7 @@ namespace authdb { extern class Client AuthClient; extern std::mutex AuthClientLock; extern class Session AuthSession; extern Session *AuthSession; struct AuthHeader{ int start = 0xFE; Loading src/session.cpp +1 −15 Changes for src/session.cpp: 1 added line, 15 removed lines. Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ #include <iostream> #include <mutex> #include <set> #include "session.h" #include "authdb.h" Loading Loading @@ -637,19 +638,4 @@ void authdb::ClusterSession::listSessions(std::vector<SessionInfo> &out){ out.push_back(std::move(info)); } } } if(prev) prev->_next=next; if(cur==_firstData) _firstData=next; if(cur==_lastData) _lastData=prev; cur->_next=nullptr; delete cur; cur=next; }else{ prev=cur; cur=cur->_next; } } } Loading
src/authdb.cpp +10 −1 Changes for src/authdb.cpp: 10 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -79,7 +79,7 @@ namespace authdb { PluginManager *g_PluginManager = nullptr; class Client AuthClient; class Session AuthSession; Session *AuthSession = nullptr; std::mutex g_wizzard; Loading Loading @@ -667,6 +667,15 @@ int main(int argc,char *argv[]){ << " with " << ccfg.peers.size() << " peer(s)" << std::endl; } // Instantiate session store: cluster-aware or local-only std::unique_ptr<authdb::Session> sessionStore; if (clusterEnabled) { sessionStore = std::make_unique<authdb::ClusterSession>(); } else { sessionStore = std::make_unique<authdb::LocalSession>(); } authdb::AuthSession = sessionStore.get(); authdb::AuthBackend backend( clusterEnabled ? authdb::AuthBackendType::ClusterStore : authdb::AuthBackendType::File, backendPath, Loading
src/authdb.h +1 −1 Changes for src/authdb.h: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -47,7 +47,7 @@ namespace authdb { extern class Client AuthClient; extern std::mutex AuthClientLock; extern class Session AuthSession; extern Session *AuthSession; struct AuthHeader{ int start = 0xFE; Loading
src/session.cpp +1 −15 Changes for src/session.cpp: 1 added line, 15 removed lines. Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ #include <iostream> #include <mutex> #include <set> #include "session.h" #include "authdb.h" Loading Loading @@ -637,19 +638,4 @@ void authdb::ClusterSession::listSessions(std::vector<SessionInfo> &out){ out.push_back(std::move(info)); } } } if(prev) prev->_next=next; if(cur==_firstData) _firstData=next; if(cur==_lastData) _lastData=prev; cur->_next=nullptr; delete cur; cur=next; }else{ prev=cur; cur=cur->_next; } } }