X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2FObj%2Fauth.phh;h=8e74ffd996feda1e2c6e49168184e48cfb61f112;hb=8fe1e432c4661ebf186026f920d778d37dbe0953;hp=963755add8edb86b81958fd9510fe8a3130ff88c;hpb=312a6acc00ec7f331ab461894c319776eec95cae;p=brisk.git diff --git a/web/Obj/auth.phh b/web/Obj/auth.phh index 963755a..8e74ffd 100644 --- a/web/Obj/auth.phh +++ b/web/Obj/auth.phh @@ -47,6 +47,8 @@ class Challenge { } class Challenges { + static $delta_t; + var $item; var $item_n; var $mod; @@ -163,11 +165,9 @@ class Challenges { function load_data() { GLOBAL $sess; - $doexit = FALSE; do { if (($tok = @ftok(FTOK_PATH."/challenges", "B")) == -1) { log_main("ftok failed"); - $doexit = TRUE; break; } @@ -202,9 +202,6 @@ class Challenges { return ($chals); } while (0); - if ($doexit) - exit(); - return (FALSE); } @@ -255,7 +252,8 @@ class Challenges { return (FALSE); } if (sem_acquire($res)) { - log_lock("LOCK challenges"); + self::$delta_t = microtime(TRUE); + log_lock("LOCK challenges [".self::$delta_t."]"); return ($res); } else @@ -266,7 +264,7 @@ class Challenges { { GLOBAL $sess; - log_lock("UNLOCK challenges"); + log_lock("UNLOCK challenges [".(microtime(TRUE) - (self::$delta_t))."]"); return (sem_release($res)); }