X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2FObj%2Fauth.phh;fp=web%2FObj%2Fauth.phh;h=36b75cab1f1f5343ed9b3b5b20978787a62a7d89;hb=6a7088b090b78123ccfaa3ba00e1ea81647b173c;hp=00add0c260e8a3aec26f418f2d21b5b084152231;hpb=78f44060729d1f0c82a396aab1d05cbb75226d2d;p=brisk.git diff --git a/web/Obj/auth.phh b/web/Obj/auth.phh index 00add0c..36b75ca 100644 --- a/web/Obj/auth.phh +++ b/web/Obj/auth.phh @@ -244,13 +244,13 @@ class Challenges { return (FALSE); } - static function lock_data() + static function lock_data($is_exclusive) { if (($tok = @ftok(FTOK_PATH."/challenges", "B")) == -1) { return (FALSE); } // echo "FTOK ".$tok."
"; - if (($res = sem_get($tok)) == FALSE) { + if (($res = sem_get($tok, ($is_exclusive ? 1 : LOCK_SHARE_MAX) )) == FALSE) { return (FALSE); } if (sem_acquire($res)) {