// 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."]");
$table = &$this->table[$user->table];
$user_cur->comm[$user_cur->step % COMM_N] = "gst.st = ".($user_cur->step+1)."; ";
- $user_cur->comm[$user_cur->step % COMM_N] .= \
- sprintf('set_names([%d, "%s"], [%d, "%s"], [%d, "%s"], [%d, "%s"], [%d, "%s"]); ',
+ $user_cur->comm[$user_cur->step % COMM_N] .= sprintf('set_names([%d, "%s"], [%d, "%s"], [%d, "%s"], [%d, "%s"], [%d, "%s"]); ',
$this->user[$table->player[($user_cur->table_pos) % BRISKIN5_PLAYERS_N]]->flags,
xcape($this->user[$table->player[($user_cur->table_pos) % BRISKIN5_PLAYERS_N]]->name),
$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);
}
}