projects
/
brisk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
renamed check_webservers() to webservers_check()
[brisk.git]
/
web
/
Obj
/
auth.phh
diff --git
a/web/Obj/auth.phh
b/web/Obj/auth.phh
index
8e74ffd
..
36b75ca
100644
(file)
--- a/
web/Obj/auth.phh
+++ b/
web/Obj/auth.phh
@@
-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;
@@
-222,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);
}
@@
-242,13
+244,13
@@
class Challenges {
return (FALSE);
}
return (FALSE);
}
-
function lock_data(
)
+
static function lock_data($is_exclusive
)
{
if (($tok = @ftok(FTOK_PATH."/challenges", "B")) == -1) {
return (FALSE);
}
// echo "FTOK ".$tok."<br>";
{
if (($tok = @ftok(FTOK_PATH."/challenges", "B")) == -1) {
return (FALSE);
}
// echo "FTOK ".$tok."<br>";
- if (($res = sem_get($tok)) == FALSE) {
+ if (($res = sem_get($tok
, ($is_exclusive ? 1 : LOCK_SHARE_MAX)
)) == FALSE) {
return (FALSE);
}
if (sem_acquire($res)) {
return (FALSE);
}
if (sem_acquire($res)) {
@@
-260,7
+262,7
@@
class Challenges {
return (FALSE);
}
return (FALSE);
}
- function unlock_data($res)
+
static
function unlock_data($res)
{
GLOBAL $sess;
{
GLOBAL $sess;