Loading src/api.cpp +0 −9 Original line number Diff line number Diff line Loading @@ -97,7 +97,6 @@ namespace { class Api { public: void checkGPO(json_object *request, json_object *response) { AuthBackend::Guard guard(_Backend, AuthBackend::Shared); json_object* cmd = get_commands_array_or_throw(request); int fcount = json_object_array_length(cmd); Loading @@ -120,7 +119,6 @@ public: } void existsGPO(json_object *request, json_object *response) { AuthBackend::Guard guard(_Backend, AuthBackend::Shared); json_object* cmd = get_commands_array_or_throw(request); int fcount = json_object_array_length(cmd); Loading Loading @@ -150,7 +148,6 @@ public: } void addGPO(json_object *request, json_object *response) { AuthBackend::Guard guard(_Backend, AuthBackend::Exclusive); json_object* cmd = get_commands_array_or_throw(request); int fcount = json_object_array_length(cmd); Loading Loading @@ -252,7 +249,6 @@ public: } const SessionData* userLogin(json_object *request, json_object *response) { AuthBackend::Guard guard(_Backend, AuthBackend::Shared); json_object* cmd = get_commands_array_or_throw(request); int fcount = json_object_array_length(cmd); Loading Loading @@ -322,7 +318,6 @@ public: } const ClientConnections* ClientLogin(json_object *request, json_object *response) { AuthBackend::Guard guard(_Backend, AuthBackend::Shared); json_object* cmd = get_commands_array_or_throw(request); int fcount = json_object_array_length(cmd); Loading Loading @@ -383,7 +378,6 @@ public: } void Connection(json_object *request, json_object *response) { AuthBackend::Guard guard(_Backend, AuthBackend::Exclusive); json_object* cmd = get_commands_array_or_throw(request); int fcount = json_object_array_length(cmd); Loading Loading @@ -573,7 +567,6 @@ public: } void changeUserPw(json_object *request, json_object *response) { AuthBackend::Guard guard(_Backend, AuthBackend::Exclusive); json_object* cmd = get_commands_array_or_throw(request); int fcount = json_object_array_length(cmd); Loading Loading @@ -650,7 +643,6 @@ public: } void UserInfo(json_object *request, json_object *response) { AuthBackend::Guard guard(_Backend, AuthBackend::Shared); json_object* cmd = get_commands_array_or_throw(request); int fcount = json_object_array_length(cmd); Loading Loading @@ -690,7 +682,6 @@ public: } void listGroups(json_object *request, json_object *response) { AuthBackend::Guard guard(_Backend, AuthBackend::Shared); json_object* cmd = get_commands_array_or_throw(request); int fcount = json_object_array_length(cmd); Loading src/authdb.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -342,6 +342,7 @@ namespace authdb { } if(apidb){ AuthBackend::Guard guard(*apidb); try{ ApiController(*apidb,did,curreq,tid,args); g_Log.access(clientAddr,method,curreq.getRequestURL(),200); Loading src/backend.cpp +0 −9 Original line number Diff line number Diff line Loading @@ -85,15 +85,6 @@ void authdb::AuthBackend::unlock(){ } void authdb::AuthBackend::lock_shared(){ // Briefly upgrade to exclusive to allow fetchFromCluster, then downgrade. // This is safe because _Lock serializes access and the fetch is cached (30 s). if (_Lock.try_lock_for(std::chrono::seconds(2))) { try { _Api->lock(); _Api->unlock(); } catch (...) {} _Lock.unlock(); } if (!_Lock.try_lock_shared_for(std::chrono::seconds(5))) throw AuthBackendError("backend shared lock timeout"); } Loading Loading
src/api.cpp +0 −9 Original line number Diff line number Diff line Loading @@ -97,7 +97,6 @@ namespace { class Api { public: void checkGPO(json_object *request, json_object *response) { AuthBackend::Guard guard(_Backend, AuthBackend::Shared); json_object* cmd = get_commands_array_or_throw(request); int fcount = json_object_array_length(cmd); Loading @@ -120,7 +119,6 @@ public: } void existsGPO(json_object *request, json_object *response) { AuthBackend::Guard guard(_Backend, AuthBackend::Shared); json_object* cmd = get_commands_array_or_throw(request); int fcount = json_object_array_length(cmd); Loading Loading @@ -150,7 +148,6 @@ public: } void addGPO(json_object *request, json_object *response) { AuthBackend::Guard guard(_Backend, AuthBackend::Exclusive); json_object* cmd = get_commands_array_or_throw(request); int fcount = json_object_array_length(cmd); Loading Loading @@ -252,7 +249,6 @@ public: } const SessionData* userLogin(json_object *request, json_object *response) { AuthBackend::Guard guard(_Backend, AuthBackend::Shared); json_object* cmd = get_commands_array_or_throw(request); int fcount = json_object_array_length(cmd); Loading Loading @@ -322,7 +318,6 @@ public: } const ClientConnections* ClientLogin(json_object *request, json_object *response) { AuthBackend::Guard guard(_Backend, AuthBackend::Shared); json_object* cmd = get_commands_array_or_throw(request); int fcount = json_object_array_length(cmd); Loading Loading @@ -383,7 +378,6 @@ public: } void Connection(json_object *request, json_object *response) { AuthBackend::Guard guard(_Backend, AuthBackend::Exclusive); json_object* cmd = get_commands_array_or_throw(request); int fcount = json_object_array_length(cmd); Loading Loading @@ -573,7 +567,6 @@ public: } void changeUserPw(json_object *request, json_object *response) { AuthBackend::Guard guard(_Backend, AuthBackend::Exclusive); json_object* cmd = get_commands_array_or_throw(request); int fcount = json_object_array_length(cmd); Loading Loading @@ -650,7 +643,6 @@ public: } void UserInfo(json_object *request, json_object *response) { AuthBackend::Guard guard(_Backend, AuthBackend::Shared); json_object* cmd = get_commands_array_or_throw(request); int fcount = json_object_array_length(cmd); Loading Loading @@ -690,7 +682,6 @@ public: } void listGroups(json_object *request, json_object *response) { AuthBackend::Guard guard(_Backend, AuthBackend::Shared); json_object* cmd = get_commands_array_or_throw(request); int fcount = json_object_array_length(cmd); Loading
src/authdb.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -342,6 +342,7 @@ namespace authdb { } if(apidb){ AuthBackend::Guard guard(*apidb); try{ ApiController(*apidb,did,curreq,tid,args); g_Log.access(clientAddr,method,curreq.getRequestURL(),200); Loading
src/backend.cpp +0 −9 Original line number Diff line number Diff line Loading @@ -85,15 +85,6 @@ void authdb::AuthBackend::unlock(){ } void authdb::AuthBackend::lock_shared(){ // Briefly upgrade to exclusive to allow fetchFromCluster, then downgrade. // This is safe because _Lock serializes access and the fetch is cached (30 s). if (_Lock.try_lock_for(std::chrono::seconds(2))) { try { _Api->lock(); _Api->unlock(); } catch (...) {} _Lock.unlock(); } if (!_Lock.try_lock_shared_for(std::chrono::seconds(5))) throw AuthBackendError("backend shared lock timeout"); } Loading