$this->room_join_wakeup($user_cur, FALSE, 0);
$table_cur->table_token = "";
$table_cur->wakeup_time = $curtime + WAKEUP_TIME;
- Bin5::destroy_data($table_idx);
+
+ $bri->destroy_data($table_idx);
}
else {
log_main("gm:: save_data");
return (FALSE);
}
+ function destroy_data($tab_id)
+ {
+ do {
+ if (($tok = @ftok(FTOK_PATH."/bin5/table".$tab_id."/user".$this->table_pos, "B")) == -1) {
+ log_crit("BIN5 USER DATA REMOVE FAILED 1 [".FTOK_PATH."/bin5/table".$tab_id."/user".$this->table_pos."]");
+ break;
+ }
+
+ if (($shm = @shmop_open($tok, 'a', 0, 0)) == FALSE) {
+ log_crit("BIN5 USER DATA REMOVE FAILED 2");
+ break;
+ }
+ if (shmop_delete($shm) == 0) {
+ log_crit("BIN5 USER DATA REMOVE FAILED 3");
+ break;
+ }
+ $shm = FALSE;
+
+ log_main("BIN5 USER DATA DESTROY SUCCESS");
+
+ // log_main("QUI CI ARRIVA [".$bri->user[0]->name."]");
+ $ret = TRUE;
+ } while (0);
+
+ if ($shm)
+ shm_detach($shm);
+
+ return ($ret);
+ }
+
} // end class Bin5_user
- function destroy_data($table_idx)
+ function destroy_data()
{
GLOBAL $sess;