var $subst; // substatus for each status
var $step; // step of the current status
var $trans_step; // step to enable transition between pages (disable == -1)
+ var $cl_step; // current step returned by client
var $rd_socket; // socket handle of push stream
var $rd_endtime; // end time for push stream
$thiz->subst = $subst;
$thiz->step = 1;
$thiz->trans_step = -1;
+ $thiz->cl_step = -1;
$thiz->comm = array();
$thiz->rd_socket = NULL;
$this->subst = $from->subst;
$this->step = $from->step;
$this->trans_step = $from->trans_step;
+ $this->cl_step = $from->cl_step;
$this->comm = array();
$i_start = (1 > ($from->step - COMM_N) ? 1 : ($from->step - COMM_N));
$thiz->subst = $from->subst;
$thiz->step = $from->step;
$thiz->trans_step = $from->trans_step;
+ $thiz->cl_step = $from->cl_step;
$thiz->comm = array();
/*
return (($this->flags & USER_FLAG_AUTH) && ($this->flags & USER_FLAG_TY_CERT));
}
+ function is_empty()
+ {
+ return ($this->sess == "");
+ }
+
+ function is_active()
+ {
+ if ($this->sess != "" && !$this->the_end) // OK: is_active()
+ return TRUE;
+ return FALSE;
+ }
+
function flags_set($flags, $mask)
{
$flags_old = $this->flags & (~$mask);
$this->rd_endtime = $curtime + RD_ENDTIME_DELTA;
$this->rd_stat = $stat;
$this->rd_subst = $subst;
- $this->rd_step = $step;
+ $this->rd_step = $step; // TRACKED
$this->rd_from = $from;
$this->rd_scristp = 0;
$this->rd_kalive = $curtime + RD_KEEPALIVE_TOUT;
log_rd("maincheck begin");
- $ret = FALSE;
+ $ret = "";
$curtime = time();
-
+
/* Nothing changed, return. */
if ($this->rd_step == $this->step)
return (FALSE);
log_rd2("do other cur_stat[".$this->rd_stat."] user->stat[".$this->stat."] cur_step[".$this->rd_step."] user_step[".$this->step."]");
if ($this->rd_step == -1) {
- /*
- * if $this->rd_step == -1 load the current state from the main struct
- */
-
+ /* if $this->rd_step == -1 load the current state from the main struct */
$S_load_stat['wR_minusone']++;
-
- // if ($this->the_end == TRUE) {
- // log_rd2("main_check: the end".var_export(debug_backtrace()));
- // }
-
+
if ($this->trans_step != -1) {
log_rd2("TRANS USATO ".$this->trans_step);
- $this->rd_step = $this->trans_step;
+ $this->rd_step = $this->step = $this->trans_step; // TRACKED
+ $ret .= $this->room->show_room($this->step, $this);
$this->trans_step = -1;
}
else {
if ($this->stat == 'room') {
log_rd("roomma ".$this->step);
- $curtime = time();
if ($this->rec !== FALSE) {
$doc_filepath = $G_base.$G_doc_path.sprintf($G_tos_fname, $G_tos_vers, $G_lang);
$doc_filename = basename($doc_filepath);
/* NOTE the sets went common */
$this->rd_stat = $this->stat;
$this->rd_subst = $this->subst;
- $this->rd_step = $this->step;
+ $this->rd_step = $this->step; // TRACKED
}
/***************
* *
}
$this->rd_stat = $this->stat;
$this->rd_subst = $this->subst;
- $this->rd_step = $this->step;
+ $this->rd_step = $this->step;
} while (0);
log_rd2($this->step, 'index_rd.php: after ret set');
-
- if ($this->the_end == TRUE) {
- log_rd2("LOGOUT BYE BYE!!");
- log_auth($this->sess, "Explicit logout.");
-
- $this->reset();
-
- if ($this->subst == 'sitdown') {
- log_load("ROOM WAKEUP");
- $this->room->room_wakeup($this);
- }
- else if ($this->subst == 'standup')
- $this->room->room_outstandup($this);
- else
- log_rd2("LOGOUT FROM WHAT ???");
- } /* if ($this->the_end == TRUE) { ... */
+
+ // if ($this->the_end == TRUE) { management is moved
+ // in the spush scope
} /* if ($this->rd_step < $this->step) { */
} /* else of if ($this->rd_step == -1) { */
-
+
+ if ($ret == "")
+ $ret = FALSE;
return ($ret);
} // function maincheck(...