Commit 991a89ad authored by jan.koester's avatar jan.koester
Browse files

test

parent 0a80b88b
Loading
Loading
Loading
Loading
Loading
+9 −5
Changes for src/backends/file.cpp: 9 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -308,11 +308,15 @@ void authdb::File::lock(){
        }

         if( flock( _LockDes, LOCK_EX)  != 0 ){
            switch(errno){
                case ENOLCK | EINVAL:{
                    std::string err = "couldn't lock the lockfile: ";
                    err+=strerror(errno);
                    throw AuthBackendError(err.c_str());
            int err = errno;
            close(_LockDes);
            _LockDes = -1;
            switch(err){
                case ENOLCK:
                case EINVAL:{
                    std::string msg = "couldn't lock the lockfile: ";
                    msg+=strerror(err);
                    throw AuthBackendError(msg.c_str());
                }
                default:
                    continue;