/*
* brisk - auth.phh
*
- * Copyright (C) 2006-2008 Matteo Nastasi
+ * Copyright (C) 2006-2011 Matteo Nastasi
* mailto: nastasi@alternativeoutput.it
* matteo.nastasi@milug.org
* web: http://www.alternativeoutput.it
}
// Static functions
- function &init_data()
+ static function &create()
{
$chal =& new Hardbans();
if ($hban == FALSE) {
log_only("INIT HARDBAN DATA");
- $hban =& Hardbans::init_data();
+ $hban =& Hardbans::create();
if (@shm_put_var($shm, $tok, $hban) == FALSE) {
log_only("PUT_VAR FALLITA ".strlen(serialize($hban)));
log_only(serialize($hban));
function lock_data()
{
if (($tok = @ftok(FTOK_PATH."/hardbans", "B")) == -1) {
- echo "FTOK FAILED";
- exit;
+ return (FALSE);
}
// echo "FTOK ".$tok."<br>";
if (($res = sem_get($tok)) == FALSE) {
- echo "SEM_GET FAILED";
- exit;
+ return (FALSE);
}
if (sem_acquire($res)) {
log_lock("LOCK hardbans");