var $delay_mgr;
+ public static $sess_cur;
+
function Brisk($crystal_filename) {
$this->crystal_filename = $crystal_filename;
$this->user = array();
$this->shm_sz = SHM_DIMS_MIN;
$this->delay_mgr = new Delay_Manager(1.5);
+
+ static::$sess_cur = FALSE;
}
function garbage_manager($force)
break;
}
+ $this->sess_cur_set($user->sess);
// close a previous opened index_read_ifra socket, if exists
if (($prev = $user->rd_socket_get()) != NULL) {
$s_a_p->socks_unset($user->rd_socket_get());
}
return NULL;
}
+ function sess_cur_set($sess)
+ {
+ static::$sess_cur = $sess;
+ }
+ static function sess_cur_get()
+ {
+ return(static::$sess_cur);
+ }
} // end class Brisk
function make_seed()
function log_mop($step, $log)
{
- GLOBAL $sess, $PHP_SELF;
+ GLOBAL $PHP_SELF;
if (BRISK_SINGLE_SESS == "" && (BRISK_DEBUG & DBG_LMOP) == 0)
return;
+ $sess = Brisk::sess_cur_get();
if (isset($sess) == FALSE)
$ssess = "XXXX";
else
function log_only2($log)
{
- GLOBAL $sess, $PHP_SELF;
+ GLOBAL $PHP_SELF;
if (BRISK_SINGLE_SESS == "" && (BRISK_DEBUG & DBG_ONL2) == 0)
return;
+ $sess = Brisk::sess_cur_get();
if (isset($sess) == FALSE)
$ssess = "XXXX";
else
function log_crit($log)
{
- GLOBAL $sess, $PHP_SELF;
+ GLOBAL $PHP_SELF;
if (BRISK_SINGLE_SESS == "" && (BRISK_DEBUG & DBG_CRIT) == 0)
return;
+ $sess = Brisk::sess_cur_get();
if (isset($sess) == FALSE)
$ssess = "XXXX";
else
function log_only($log)
{
- GLOBAL $sess, $PHP_SELF;
+ GLOBAL $PHP_SELF;
if (BRISK_SINGLE_SESS == "" && (BRISK_DEBUG & DBG_ONLY) == 0)
return;
+ $sess = Brisk::sess_cur_get();
if (isset($sess) == FALSE)
$ssess = "XXXX";
else
function log_main($log)
{
- GLOBAL $sess, $PHP_SELF;
+ GLOBAL $PHP_SELF;
if (BRISK_SINGLE_SESS == "" && (BRISK_DEBUG & DBG_MAIN) == 0)
return;
+ $sess = Brisk::sess_cur_get();
if (isset($sess) == FALSE)
$ssess = "XXXX";
else
function log_rd($log)
{
- GLOBAL $sess, $PHP_SELF;
+ GLOBAL $PHP_SELF;
if (BRISK_SINGLE_SESS == "" && (BRISK_DEBUG & DBG_READ) == 0)
return;
+ $sess = Brisk::sess_cur_get();
if (isset($sess) == FALSE)
$ssess = "XXXX";
else
function log_rd2($log)
{
- GLOBAL $sess, $PHP_SELF;
+ GLOBAL $PHP_SELF;
if (BRISK_SINGLE_SESS == "" && (BRISK_DEBUG & DBG_REA2) == 0)
return;
+ $sess = Brisk::sess_cur_get();
if (isset($sess) == FALSE)
$ssess = "XXXX";
else
function log_send($log)
{
- GLOBAL $sess, $PHP_SELF;
+ GLOBAL $PHP_SELF;
if (BRISK_SINGLE_SESS == "" && (BRISK_DEBUG & DBG_SEND) == 0)
return;
+ $sess = Brisk::sess_cur_get();
if (isset($sess) == FALSE)
$ssess = "XXXX";
else
function log_lock($log)
{
- GLOBAL $sess, $PHP_SELF;
+ GLOBAL $PHP_SELF;
if (BRISK_SINGLE_SESS == "" && (BRISK_DEBUG & DBG_LOCK) == 0)
return;
+ $sess = Brisk::sess_cur_get();
if (isset($sess) == FALSE)
$ssess = "XXXX";
else
function log_wr($log)
{
- GLOBAL $sess, $PHP_SELF;
+ GLOBAL $PHP_SELF;
if (BRISK_SINGLE_SESS == "" && (BRISK_DEBUG & DBG_WRIT) == 0)
return;
+ $sess = Brisk::sess_cur_get();
if (isset($sess) == FALSE)
$ssess = "XXXX";
else
function log_load($log)
{
- GLOBAL $sess, $PHP_SELF;
+ GLOBAL $PHP_SELF;
if (BRISK_SINGLE_SESS == "" && (BRISK_DEBUG & DBG_LOAD) == 0)
return;
+ $sess = Brisk::sess_cur_get();
if (isset($sess) == FALSE)
$ssess = "XXXX";
else
function log_shme($log)
{
- GLOBAL $sess, $PHP_SELF;
+ GLOBAL $PHP_SELF;
if (BRISK_SINGLE_SESS == "" && (BRISK_DEBUG & DBG_SHME) == 0)
return;
+ $sess = Brisk::sess_cur_get();
if (isset($sess) == FALSE)
$ssess = "XXXX";
else