projects
/
brisk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
destroy_data process completed
[brisk.git]
/
web
/
Obj
/
auth.phh
diff --git
a/web/Obj/auth.phh
b/web/Obj/auth.phh
index
963755a
..
0615388
100644
(file)
--- a/
web/Obj/auth.phh
+++ b/
web/Obj/auth.phh
@@
-47,6
+47,8
@@
class Challenge {
}
class Challenges {
}
class Challenges {
+ static $delta_t;
+
var $item;
var $item_n;
var $mod;
var $item;
var $item_n;
var $mod;
@@
-163,11
+165,9
@@
class Challenges {
function load_data()
{
GLOBAL $sess;
function load_data()
{
GLOBAL $sess;
- $doexit = FALSE;
do {
if (($tok = @ftok(FTOK_PATH."/challenges", "B")) == -1) {
log_main("ftok failed");
do {
if (($tok = @ftok(FTOK_PATH."/challenges", "B")) == -1) {
log_main("ftok failed");
- $doexit = TRUE;
break;
}
break;
}
@@
-179,7
+179,7
@@
class Challenges {
$shm_sz = CHAL_SHM_DIMS_MIN;
if ($shm = shm_attach($tok, $shm_sz)) {
$shm_sz = CHAL_SHM_DIMS_MIN;
if ($shm = shm_attach($tok, $shm_sz)) {
- $chals = @shm_get_var($shm, $tok);
+ $chals = @shm_get_var($shm, $tok);
// CHECKED BELOW
log_only("challenges == ".($chals == FALSE ? "FALSE" : "TRUE")." challenges === ".($chals === FALSE ? "FALSE" : "TRUE")." challenges isset ".(isset($chals) ? "TRUE" : "FALSE"));
log_only("challenges == ".($chals == FALSE ? "FALSE" : "TRUE")." challenges === ".($chals === FALSE ? "FALSE" : "TRUE")." challenges isset ".(isset($chals) ? "TRUE" : "FALSE"));
@@
-191,6
+191,7
@@
class Challenges {
log_only("PUT_VAR FALLITA ".strlen(serialize($chals)));
log_only(serialize($chals));
}
log_only("PUT_VAR FALLITA ".strlen(serialize($chals)));
log_only(serialize($chals));
}
+ log_shme("Challenges::save_data2");
}
$chals->shm_sz = $shm_sz;
}
$chals->shm_sz = $shm_sz;
@@
-202,9
+203,6
@@
class Challenges {
return ($chals);
} while (0);
return ($chals);
} while (0);
- if ($doexit)
- exit();
-
return (FALSE);
}
return (FALSE);
}
@@
-225,7
+223,8
@@
class Challenges {
log_only("challenges count ".count($chals->item)." _n: ".$chals->item_n);
$chals->mod = FALSE;
log_only("challenges count ".count($chals->item)." _n: ".$chals->item_n);
$chals->mod = FALSE;
- if (shm_put_var($shm, $tok, $chals) != FALSE) {
+ if (@shm_put_var($shm, $tok, $chals) != FALSE) {
+ log_shme("Challenges::save_data");
shm_detach($shm);
return (TRUE);
}
shm_detach($shm);
return (TRUE);
}
@@
-255,7
+254,8
@@
class Challenges {
return (FALSE);
}
if (sem_acquire($res)) {
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
return ($res);
}
else
@@
-266,7
+266,7
@@
class Challenges {
{
GLOBAL $sess;
{
GLOBAL $sess;
- log_lock("UNLOCK challenges");
+ log_lock("UNLOCK challenges
[".(microtime(TRUE) - (self::$delta_t))."]
");
return (sem_release($res));
}
return (sem_release($res));
}