projects
/
brisk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
is_exclusive argument added to all lock_data() functions, (exclusivity is always...
[brisk.git]
/
web
/
Obj
/
auth.phh
diff --git
a/web/Obj/auth.phh
b/web/Obj/auth.phh
index
00add0c
..
36b75ca
100644
(file)
--- a/
web/Obj/auth.phh
+++ b/
web/Obj/auth.phh
@@
-244,13
+244,13
@@
class Challenges {
return (FALSE);
}
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."<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)) {