rewritten: sessions management
(Session, SessionContainer, SessionManager) now a Session object don't copy all fields in its copy constructor (only id) the rest fields are set after the object is inserted in SessionContainer added: after successfully login a session id is changed added: plugin.Call() methods with a first argument a pointer to a Session object git-svn-id: svn://ttmath.org/publicrep/winix/trunk@823 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -123,7 +123,7 @@ StatsSession * stats_session = 0;
|
||||
void SessionCreated(PluginInfo & info)
|
||||
{
|
||||
StatsSession * d = new StatsSession();
|
||||
info.cur->session->plugin_data.Assign(d);
|
||||
info.session->plugin_data.Assign(d);
|
||||
|
||||
if( !info.cur->request->IsParam(nostat_param) )
|
||||
{
|
||||
@@ -141,7 +141,7 @@ void RemoveSession(PluginInfo & info)
|
||||
{
|
||||
// temporarily for debug
|
||||
// sometimes the pointer is null here
|
||||
log << log1 << "Stats: why the info.plugin_data_base is zero? !!!!, ses_id: " << info.cur->session->id << logend;
|
||||
log << log1 << "Stats: why the info.plugin_data_base is zero? !!!!, ses_id: " << info.session->id << logend;
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -200,7 +200,7 @@ using namespace Stats;
|
||||
plugin.Assign(WINIX_TEMPLATES_CREATEFUNCTIONS, CreateFunctions);
|
||||
plugin.Assign(WINIX_CONTENT_MAKE, ContentMake);
|
||||
plugin.Assign(WINIX_SESSION_CREATED, SessionCreated);
|
||||
plugin.Assign(WINIX_SESSION_REMOVE, RemoveSession);
|
||||
plugin.Assign(WINIX_PLUGIN_SESSION_DATA_REMOVE, RemoveSession);
|
||||
plugin.Assign(WINIX_CLOSE, Close);
|
||||
plugin.Assign(WINIX_FILE_REMOVED, RemoveFile);
|
||||
plugin.Assign(WINIX_DIR_PREPARE_TO_REMOVE, RemoveDir);
|
||||
|
Reference in New Issue
Block a user