chmod 777 ${ftokk_path}/bin5
fi
- for i in $(seq 0 $max_players); do
+ for i in $(seq 0 $((tables_n - 1))); do
if [ ! -d ${ftokk_path}/bin5/table$i ]; then
mkdir ${ftokk_path}/bin5/table$i
fi
touch ${ftokk_path}/bin5/table$i/user$e
chmod 666 ${ftokk_path}/bin5/table$i/user$e
done
+ # create subdirectories in proxy path
+ if [ ! -d ${proxy_path}/bin5/table$i ]; then
+ mkdir -p ${proxy_path}/bin5/table$i
+ fi
done
+ chmod -R 777 ${proxy_path}/bin5
- # create subdirectories in proxy path
- if [ ! -d ${proxy_path}/bin5 ]; then
- mkdir ${proxy_path}/bin5
- fi
- chmod 777 ${proxy_path}/bin5
fi
install -d ${web_path}__
for i in $(find web -type d | grep -v /CVS | sed 's/^....//g'); do
window.onunload = null; document.location.assign("../index.php");"
in user->comm var for client xhr
- set $bri->the_end = TRUE
+
+
+-> index.php (after verify session value: ~L250)
+ - garbage_manager(TRUE)
+ - allign many status var with briskin5 user values
+ - room_join_wakeup()
log_only("PUT_VAR FALLITA ".strlen(serialize($chals)));
log_only(serialize($chals));
}
+ log_shme("Challenges::save_data2");
}
$chals->shm_sz = $shm_sz;
log_only("challenges count ".count($chals->item)." _n: ".$chals->item_n);
$chals->mod = FALSE;
- if (shm_put_var($shm, $tok, $chals) != FALSE) {
+ if (@shm_put_var($shm, $tok, $chals) != FALSE) {
+ log_shme("Challenges::save_data");
shm_detach($shm);
return (TRUE);
}
define(DBG_CRIT, 0x0400);
define(DBG_LMOP, 0x0800);
define(DBG_TRAC, 0x1000);
+define(DBG_SHME, 0x2000);
// NOTE: BRISK DEBUG must be a numerical constant, not the result of operations on symbols
define(BRISK_DEBUG, 0xffffffbf);
log_only("PUT_VAR FALLITA ".strlen(serialize($user)));
log_only(serialize($user));
}
+ log_shme("User::save_data2");
}
else {
if ($sess != FALSE) {
break;
// log_only("PUT_VAR DI ".strlen(serialize($user)));
- if (shm_put_var($shm, $tok, $user) != FALSE) {
+ if (@shm_put_var($shm, $tok, $user) != FALSE) {
shm_detach($shm);
if ($user->sess != "")
$user->save_step();
+
+ log_shme("User::save_data");
+
log_main("User[".$id."] saved.");
return (TRUE);
}
$room = Room::create();
+ log_shme("Room::create");
+
if (Room::save_data($room) == FALSE)
return FALSE;
break;
// log_only("PUT_VAR DI ".strlen(serialize($room)));
- if (shm_put_var($shm, $tok, $room) != FALSE) {
+ if (@shm_put_var($shm, $tok, $room) != FALSE) {
shm_detach($shm);
return (TRUE);
}
break;
// log_only("PUT_VAR DI ".strlen(serialize($room)));
- if (shm_put_var($shm, $tok, $room) != FALSE) {
+ if (@shm_put_var($shm, $tok, $room) != FALSE) {
+ log_shme("Room::save_data");
$ret = TRUE;
break;
}
}
}
+function log_shme($log)
+{
+ GLOBAL $sess, $PHP_SELF;
+
+ if (BRISK_SINGLE_SESS == "" && (BRISK_DEBUG & DBG_SHME) == 0)
+ return;
+
+ if (isset($sess) == FALSE)
+ $ssess = "XXXX";
+ else
+ $ssess = $sess;
+
+ if (( (BRISK_DEBUG | ($ssess == BRISK_SINGLE_SESS ? BRISK_SINGLE_DEBUG : 0) ) & DBG_SHME) == 0)
+ return;
+
+ if (BRISK_DEBUG & DBG_TRAC)
+ $btrace = btrace_line(debug_backtrace());
+ else
+ $btrace = "";
+ if (($fp = @fopen(LEGAL_PATH."/brisk.log", 'a')) != FALSE) {
+ fwrite($fp, sprintf("SHME: [%s] [%s] [%s]\n", $ssess, $log, $btrace));
+ fclose($fp);
+ }
+}
+
+
// function log_legal($curtime, $sess, $name, $where, $mesg)
function log_legal($curtime, $user, $where, $mesg)
log_only("PUT_VAR FALLITA ".strlen(serialize($hban)));
log_only(serialize($hban));
}
+ log_shme("Hardban::save_data2");
+
}
$hban->shm_sz = $shm_sz;
log_only("hardban count ".count($hban->item)." _n: ".$hban->item_n);
$hban->mod = FALSE;
- if (shm_put_var($shm, $tok, $hban) != FALSE) {
+ if (@shm_put_var($shm, $tok, $hban) != FALSE) {
shm_detach($shm);
+ log_shme("Hardban::save_data");
return (TRUE);
}
$hban->mod = $oldmod;
// SHSPLIT FIXME: init_data for User class ??
$user = User::create($id, "", "");
if (@shm_put_var($shm, $tok, $user) == FALSE) {
+ log_shme("Bin5_user::save_data2");
+
log_only("PUT_VAR FALLITA ".strlen(serialize($user)));
log_only(serialize($user));
}
break;
// log_only("PUT_VAR DI ".strlen(serialize($user)));
- if (shm_put_var($shm, $tok, $user) != FALSE) {
+ if (@shm_put_var($shm, $tok, $user) != FALSE) {
shm_detach($shm);
$user->save_step();
log_main("User[".$id."] saved.");
+
+ log_shme("Bin5_user::save_data");
+
return (TRUE);
}
if (shm_remove($shm) === FALSE) {
break;
if (@shm_put_var($shm, $bri->tok, $bri) != FALSE) {
+
+ log_shme("Bin5::save_data");
+
$ret = TRUE;
break;
}