Commit ab0d154a authored by jan.koester's avatar jan.koester
Browse files

test

parent 748fd14c
Loading
Loading
Loading
Loading
Loading
+2 −2
Changes for src/authdb.cpp: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -263,7 +263,7 @@ namespace authdb {
                }

                if(apidb){
                    // apidb->lock();
                    apidb->lock();
                    try{
                        ApiController(*apidb,did,curreq,tid,args);
                    }catch(AuthBackendError &e){
@@ -272,7 +272,7 @@ namespace authdb {
                        rep.setContentType("text/html");
                        rep.send(curreq,e.what(),strlen(e.what()));
                    }
                    // apidb->unlock();
                    apidb->unlock();
                }else{
                    libhttppp::HttpResponse rep;
                    rep.setState(HTTP404);
+5 −0
Changes for src/backend.h: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@
 *******************************************************************************/

#include <stdexcept>
#include <mutex>

#pragma once

@@ -74,12 +75,16 @@ namespace authdb{

        void write(const unsigned char *dest,size_t destsize);
        void read(char unsigned *src,size_t srcsize);

    private:
        int                                  _Type;
        AuthBackendApi           *_Api;
        const char                     *_Options;
        const char                     *_Domain;
        std::mutex                     _Lock;
        friend class                 AuthBackendLock;
    };

    class AuthBackendLock{
    public:
        AuthBackendLock(AuthBackend &lock);