Commit 1fc79b47 authored by jan.koester's avatar jan.koester
Browse files

test

parent 2a80bfd9
Loading
Loading
Loading
Loading
Loading
+10 −1
Changes for src/authdb.cpp: 10 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -79,7 +79,7 @@ namespace authdb {
    PluginManager  *g_PluginManager   = nullptr;

    class Client   AuthClient;
    class Session  AuthSession;
    Session        *AuthSession = nullptr;

    std::mutex g_wizzard;

@@ -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,
+1 −1
Changes for src/authdb.h: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -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;
+1 −15
Changes for src/session.cpp: 1 added line, 15 removed lines.
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@

#include <iostream>
#include <mutex>
#include <set>

#include "session.h"
#include "authdb.h"
@@ -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;
        }
    }
}