From: Matteo Nastasi (mop) Date: Sun, 1 Feb 2009 15:48:50 +0000 (+0000) Subject: log_legal refactored and locking recovery managed X-Git-Tag: 3.0.0~150 X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=commitdiff_plain;h=6c4c333b78bbb0bc7dcb5d39fecd00d3bb71ba31;p=brisk.git log_legal refactored and locking recovery managed --- diff --git a/web/briskin5/Obj/briskin5.phh b/web/briskin5/Obj/briskin5.phh index f5d5847..831cffd 100644 --- a/web/briskin5/Obj/briskin5.phh +++ b/web/briskin5/Obj/briskin5.phh @@ -257,13 +257,11 @@ class Briskin5 { // exit; // WARNING monitor this step if (($tok = @ftok(FTOK_PATH."/table".$table_idx, "B")) == -1) { - echo "FTOK FAILED"; - exit; + return (FALSE); } // WARNING monitor this step if (($res = @sem_get($tok)) == FALSE) { - echo "SEM_GET FAILED"; - exit; + return (FALSE); } if (sem_acquire($res)) { log_lock("LOCK table ".$table_idx."[res: ".$res."]"); @@ -406,8 +404,7 @@ class Briskin5 { $dt, $user->flags, xcape($user->name), xcape($user_mesg)); $user_cur->step_inc(); } - log_legal($curtime, $user->sess, $user->name, - ($user->stat == 'room' ? 'room' : 'table '.$user->table),$user_mesg); + log_legal($curtime, $user, ($user->stat == 'room' ? 'room' : 'table '.$user->table),$user_mesg); } }