Commit 0301b09f authored by jan.koester's avatar jan.koester
Browse files

fixed

parent ec64f0bf
Loading
Loading
Loading
Loading
Loading
+3 −3
Changes for src/backend.cpp: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -29,10 +29,10 @@

#include "backend.h"

authdb::AuthBackend::AuthBackend(int type, const char* options,const char *domain) : _Type(type),_Options(options),_Domain(domain) {
authdb::AuthBackend::AuthBackend(int type, const std::string &options,const std::string &domain) : _Type(type),_Options(options),_Domain(domain) {
    _Type=type;
    if(_Type==AuthBackendType::File){
        _Api =  new class File(_Options,VERSION,_Domain);
        _Api =  new class File(_Options.c_str(),VERSION,_Domain.c_str());
    }else{
        throw AuthBackendError("unkown file backend");
    }
@@ -41,7 +41,7 @@ authdb::AuthBackend::AuthBackend(int type, const char* options,const char *domai
authdb::AuthBackend::AuthBackend(const AuthBackend &backend){
     _Type=backend._Type;
    if(_Type==AuthBackendType::File){
        _Api = new class File(backend._Options,VERSION,backend._Domain);
        _Api = new class File(backend._Options.c_str(),VERSION,backend._Domain.c_str());
    }
}

+3 −3
Changes for src/backend.h: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ namespace authdb{

    class VISIBILITY AuthBackend {
    public:
        AuthBackend(int type,const char *options,const char *domain);
        AuthBackend(int type,const std::string &options,const std::string &domain);
        AuthBackend(const AuthBackend &backend);
        ~AuthBackend();

@@ -82,8 +82,8 @@ namespace authdb{
    private:
        int                                  _Type;
        AuthBackendApi           *_Api;
        const char                     *_Options;
        const char                     *_Domain;
        const std::string            _Options;
        const std::string            _Domain;
        std::mutex                     _Lock;
        friend class                 AuthBackendLock;
    };