Loading src/backend.h +2 −0 Original line number Diff line number Diff line Loading @@ -119,6 +119,8 @@ namespace authdb{ bool clusterDataExists() const; RecordIndex &getIndex(); void createRecord(AuthData &rec, int type); bool getRecord(AuthData &rec, int type); bool editRecord(AuthData &rec, int type); Loading src/client.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -114,7 +114,7 @@ void authdb::Client::create(AuthBackend& backend, class ClientData* data){ bool authdb::Client::exits(AuthBackend& backend,const uuid::uuid &clid, const char* name, int& ret){ AuthBackend::Guard guard(backend, AuthBackend::Shared); RecordIndex &idx = getIndex(backend.getOptions()); RecordIndex &idx = backend.getIndex(); if (!idx.valid()) { idx.build(backend); } Loading Loading @@ -301,7 +301,7 @@ authdb::ClientConnections * authdb::Client::ConnectionData(){ void authdb::Client::list(AuthBackend &backend,std::vector<uuid::uuid> &uuids){ AuthBackend::Guard guard(backend, AuthBackend::Shared); RecordIndex &idx = getIndex(backend.getOptions()); RecordIndex &idx = backend.getIndex(); if(!idx.valid() || idx.revision()!=backend.getRevesion()) idx.build(backend); idx.listByType(DataType::ClientData, uuids); Loading src/data.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -128,7 +128,7 @@ namespace authdb { wd=end(); } getIndex(_Options).invalidate(); getIndex().invalidate(); } bool AuthBackend::editRecord(AuthData &rec,int type){ Loading Loading @@ -212,7 +212,7 @@ namespace authdb { } if(!changemap.empty() || !newmap.empty()){ getIndex(_Options).invalidate(); getIndex().invalidate(); return true; } return false; Loading @@ -223,7 +223,7 @@ namespace authdb { if(uid.empty()) throw AuthBackendError("user info uid required!"); getIndex(_Options).invalidate(); getIndex().invalidate(); size_t bkend=end(),rd=sizeof(AuthHeader); Loading src/domain.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -96,7 +96,7 @@ void authdb::Domain::remove(AuthBackend& backend, const uuid::uuid &uid){ bool authdb::Domain::exits(AuthBackend& backend,const uuid::uuid& did, const std::string &name,int &ret){ AuthBackend::Guard guard(backend, AuthBackend::Shared); RecordIndex &idx = getIndex(backend.getOptions()); RecordIndex &idx = backend.getIndex(); if (!idx.valid()) { idx.build(backend); } Loading Loading @@ -131,7 +131,7 @@ void authdb::Domain::info(AuthBackend& backend, class DomainData& dat, size_t& p void authdb::Domain::list(AuthBackend &backend,std::vector<uuid::uuid> &uuids){ AuthBackend::Guard guard(backend, AuthBackend::Shared); RecordIndex &idx = getIndex(backend.getOptions()); RecordIndex &idx = backend.getIndex(); if(!idx.valid() || idx.revision()!=backend.getRevesion()) idx.build(backend); idx.listByType(DataType::DomainData, uuids); Loading src/gpo.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -122,7 +122,7 @@ authdb::GpoData::~GpoData(){ bool authdb::Gpo::exists(AuthBackend& backend,const uuid::uuid &gpid, const char* name, int& ret){ AuthBackend::Guard guard(backend, AuthBackend::Shared); RecordIndex &idx = getIndex(backend.getOptions()); RecordIndex &idx = backend.getIndex(); if (!idx.valid()) { idx.build(backend); } Loading Loading @@ -179,7 +179,7 @@ void authdb::Gpo::info(AuthBackend &backend, class GpoData& dat, size_t &pos){ void authdb::Gpo::list(AuthBackend &backend,std::vector<uuid::uuid> &uuids){ AuthBackend::Guard guard(backend, AuthBackend::Shared); RecordIndex &idx = getIndex(backend.getOptions()); RecordIndex &idx = backend.getIndex(); if(!idx.valid() || idx.revision()!=backend.getRevesion()) idx.build(backend); idx.listByType(DataType::PolicyData, uuids); Loading Loading
src/backend.h +2 −0 Original line number Diff line number Diff line Loading @@ -119,6 +119,8 @@ namespace authdb{ bool clusterDataExists() const; RecordIndex &getIndex(); void createRecord(AuthData &rec, int type); bool getRecord(AuthData &rec, int type); bool editRecord(AuthData &rec, int type); Loading
src/client.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -114,7 +114,7 @@ void authdb::Client::create(AuthBackend& backend, class ClientData* data){ bool authdb::Client::exits(AuthBackend& backend,const uuid::uuid &clid, const char* name, int& ret){ AuthBackend::Guard guard(backend, AuthBackend::Shared); RecordIndex &idx = getIndex(backend.getOptions()); RecordIndex &idx = backend.getIndex(); if (!idx.valid()) { idx.build(backend); } Loading Loading @@ -301,7 +301,7 @@ authdb::ClientConnections * authdb::Client::ConnectionData(){ void authdb::Client::list(AuthBackend &backend,std::vector<uuid::uuid> &uuids){ AuthBackend::Guard guard(backend, AuthBackend::Shared); RecordIndex &idx = getIndex(backend.getOptions()); RecordIndex &idx = backend.getIndex(); if(!idx.valid() || idx.revision()!=backend.getRevesion()) idx.build(backend); idx.listByType(DataType::ClientData, uuids); Loading
src/data.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -128,7 +128,7 @@ namespace authdb { wd=end(); } getIndex(_Options).invalidate(); getIndex().invalidate(); } bool AuthBackend::editRecord(AuthData &rec,int type){ Loading Loading @@ -212,7 +212,7 @@ namespace authdb { } if(!changemap.empty() || !newmap.empty()){ getIndex(_Options).invalidate(); getIndex().invalidate(); return true; } return false; Loading @@ -223,7 +223,7 @@ namespace authdb { if(uid.empty()) throw AuthBackendError("user info uid required!"); getIndex(_Options).invalidate(); getIndex().invalidate(); size_t bkend=end(),rd=sizeof(AuthHeader); Loading
src/domain.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -96,7 +96,7 @@ void authdb::Domain::remove(AuthBackend& backend, const uuid::uuid &uid){ bool authdb::Domain::exits(AuthBackend& backend,const uuid::uuid& did, const std::string &name,int &ret){ AuthBackend::Guard guard(backend, AuthBackend::Shared); RecordIndex &idx = getIndex(backend.getOptions()); RecordIndex &idx = backend.getIndex(); if (!idx.valid()) { idx.build(backend); } Loading Loading @@ -131,7 +131,7 @@ void authdb::Domain::info(AuthBackend& backend, class DomainData& dat, size_t& p void authdb::Domain::list(AuthBackend &backend,std::vector<uuid::uuid> &uuids){ AuthBackend::Guard guard(backend, AuthBackend::Shared); RecordIndex &idx = getIndex(backend.getOptions()); RecordIndex &idx = backend.getIndex(); if(!idx.valid() || idx.revision()!=backend.getRevesion()) idx.build(backend); idx.listByType(DataType::DomainData, uuids); Loading
src/gpo.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -122,7 +122,7 @@ authdb::GpoData::~GpoData(){ bool authdb::Gpo::exists(AuthBackend& backend,const uuid::uuid &gpid, const char* name, int& ret){ AuthBackend::Guard guard(backend, AuthBackend::Shared); RecordIndex &idx = getIndex(backend.getOptions()); RecordIndex &idx = backend.getIndex(); if (!idx.valid()) { idx.build(backend); } Loading Loading @@ -179,7 +179,7 @@ void authdb::Gpo::info(AuthBackend &backend, class GpoData& dat, size_t &pos){ void authdb::Gpo::list(AuthBackend &backend,std::vector<uuid::uuid> &uuids){ AuthBackend::Guard guard(backend, AuthBackend::Shared); RecordIndex &idx = getIndex(backend.getOptions()); RecordIndex &idx = backend.getIndex(); if(!idx.valid() || idx.revision()!=backend.getRevesion()) idx.build(backend); idx.listByType(DataType::PolicyData, uuids); Loading