changed: added Cur structure
we have there two pointers: Request * request; Session * session; these are the current request and the current session the session GC was moved to SessionManager (was in SessionContainer) git-svn-id: svn://ttmath.org/publicrep/winix/trunk@708 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -3,17 +3,16 @@
|
||||
bot.o: bot.h
|
||||
init.o: ../../core/log.h ../../core/textstream.h ../../core/misc.h
|
||||
init.o: ../../core/item.h ../../core/request.h ../../core/requesttypes.h
|
||||
init.o: ../../core/session.h ../../core/error.h ../../core/log.h
|
||||
init.o: ../../core/user.h ../../core/plugindata.h ../../core/rebus.h
|
||||
init.o: ../../core/config.h ../../core/confparser.h ../../core/htmlfilter.h
|
||||
init.o: ../../core/error.h ../../core/log.h ../../core/config.h
|
||||
init.o: ../../core/confparser.h ../../core/htmlfilter.h
|
||||
init.o: ../../templates/htmltextstream.h ../../core/textstream.h
|
||||
init.o: ../../core/config.h ../../db/db.h ../../db/dbbase.h ../../db/dbconn.h
|
||||
init.o: ../../db/dbtextstream.h ../../core/error.h ../../db/dbitemquery.h
|
||||
init.o: ../../core/item.h ../../db/dbitemcolumns.h ../../core/user.h
|
||||
init.o: ../../core/group.h ../../core/dircontainer.h ../../core/ugcontainer.h
|
||||
init.o: bot.h stats.h templates.h ../../core/plugin.h ../../core/pluginmsg.h
|
||||
init.o: ../../core/request.h ../../core/system.h ../../core/dirs.h
|
||||
init.o: ../../core/dircontainer.h ../../notify/notify.h
|
||||
init.o: ../../core/plugindata.h ../../core/request.h ../../core/system.h
|
||||
init.o: ../../core/dirs.h ../../core/dircontainer.h ../../notify/notify.h
|
||||
init.o: ../../notify/notifypool.h ../../templates/locale.h
|
||||
init.o: ../../core/confparser.h ../../templates/misc.h
|
||||
init.o: ../../templates/localefilter.h ../../templates/locale.h
|
||||
@@ -23,15 +22,16 @@ init.o: ../../../ezc/src/functions.h ../../../ezc/src/funinfo.h
|
||||
init.o: ../../../ezc/src/stringconv.h ../../templates/htmltextstream.h
|
||||
init.o: ../../notify/notifythread.h ../../core/basethread.h
|
||||
init.o: ../../core/synchro.h ../../notify/templatesnotify.h
|
||||
init.o: ../../core/users.h ../../core/ugcontainer.h
|
||||
init.o: ../../core/lastcontainer.h ../../core/mounts.h ../../core/mount.h
|
||||
init.o: ../../core/users.h ../../core/user.h ../../core/ugcontainer.h
|
||||
init.o: ../../core/lastcontainer.h ../../core/cur.h ../../core/session.h
|
||||
init.o: ../../core/rebus.h ../../core/mounts.h ../../core/mount.h
|
||||
init.o: ../../core/mountparser.h ../../core/users.h ../../core/groups.h
|
||||
init.o: ../../core/group.h ../../core/loadavg.h ../../core/thumb.h
|
||||
init.o: ../../core/basethread.h ../../core/sessionmanager.h
|
||||
init.o: ../../core/sessioncontainer.h ../../functions/functions.h
|
||||
init.o: ../../functions/functionbase.h ../../core/system.h
|
||||
init.o: ../../core/synchro.h ../../functions/functionparser.h
|
||||
init.o: ../../functions/adduser.h ../../functions/cat.h
|
||||
init.o: ../../core/cur.h ../../functions/adduser.h ../../functions/cat.h
|
||||
init.o: ../../functions/chmod.h ../../functions/privchanger.h
|
||||
init.o: ../../functions/chown.h ../../functions/ckeditor.h
|
||||
init.o: ../../functions/cp.h ../../functions/default.h
|
||||
@@ -73,18 +73,18 @@ templates.o: ../../templates/htmltextstream.h ../../notify/notifythread.h
|
||||
templates.o: ../../core/basethread.h ../../core/synchro.h
|
||||
templates.o: ../../notify/templatesnotify.h ../../core/config.h
|
||||
templates.o: ../../core/users.h ../../core/user.h ../../core/ugcontainer.h
|
||||
templates.o: ../../core/lastcontainer.h ../../core/mounts.h
|
||||
templates.o: ../../core/mount.h ../../core/error.h ../../core/mountparser.h
|
||||
templates.o: ../../core/users.h ../../core/groups.h ../../core/group.h
|
||||
templates.o: ../../core/rebus.h ../../core/loadavg.h ../../core/thumb.h
|
||||
templates.o: ../../core/basethread.h ../../core/textstream.h
|
||||
templates.o: ../../core/misc.h ../../core/sessionmanager.h
|
||||
templates.o: ../../core/sessioncontainer.h ../../core/session.h
|
||||
templates.o: ../../core/lastcontainer.h ../../core/cur.h ../../core/session.h
|
||||
templates.o: ../../core/error.h ../../core/rebus.h ../../core/mounts.h
|
||||
templates.o: ../../core/mount.h ../../core/mountparser.h ../../core/users.h
|
||||
templates.o: ../../core/groups.h ../../core/group.h ../../core/loadavg.h
|
||||
templates.o: ../../core/thumb.h ../../core/basethread.h
|
||||
templates.o: ../../core/textstream.h ../../core/misc.h
|
||||
templates.o: ../../core/sessionmanager.h ../../core/sessioncontainer.h
|
||||
templates.o: ../../functions/functions.h ../../functions/functionbase.h
|
||||
templates.o: ../../core/request.h ../../core/requesttypes.h
|
||||
templates.o: ../../templates/htmltextstream.h ../../core/system.h
|
||||
templates.o: ../../core/synchro.h ../../functions/functionparser.h
|
||||
templates.o: ../../functions/adduser.h ../../functions/cat.h
|
||||
templates.o: ../../core/cur.h ../../functions/adduser.h ../../functions/cat.h
|
||||
templates.o: ../../functions/chmod.h ../../functions/privchanger.h
|
||||
templates.o: ../../functions/chown.h ../../functions/ckeditor.h
|
||||
templates.o: ../../functions/cp.h ../../functions/default.h
|
||||
|
@@ -42,13 +42,13 @@ long current_item_id;
|
||||
|
||||
|
||||
|
||||
void CalcItemId(Request * request)
|
||||
void CalcItemId(Cur * cur)
|
||||
{
|
||||
if( request->is_item )
|
||||
current_item_id = request->item.id;
|
||||
if( cur->request->is_item )
|
||||
current_item_id = cur->request->item.id;
|
||||
else
|
||||
if( !request->dir_tab.empty() )
|
||||
current_item_id = request->dir_tab.back()->id;
|
||||
if( !cur->request->dir_tab.empty() )
|
||||
current_item_id = cur->request->dir_tab.back()->id;
|
||||
else
|
||||
current_item_id = -1;
|
||||
}
|
||||
@@ -59,7 +59,7 @@ void CalcItemId(Request * request)
|
||||
|
||||
void UpdateStats(PluginInfo & info, Stats::ItemStats & item_stats)
|
||||
{
|
||||
bot.SetBrowserName(info.request->env_http_user_agent);
|
||||
bot.SetBrowserName(info.cur->request->env_http_user_agent);
|
||||
|
||||
stats.global_all += 1;
|
||||
item_stats.all += 1;
|
||||
@@ -89,13 +89,13 @@ void ContentMake(PluginInfo & info)
|
||||
{
|
||||
StatsSession * stats_session = 0;
|
||||
|
||||
CalcItemId(info.request);
|
||||
CalcItemId(info.cur);
|
||||
|
||||
if( current_item_id == - 1 || !info.plugin_data_base )
|
||||
return;
|
||||
|
||||
stats_session = reinterpret_cast<StatsSession*>(info.plugin_data_base);
|
||||
stats_session->nostat = info.request->IsParam(nostat_param);
|
||||
stats_session->nostat = info.cur->request->IsParam(nostat_param);
|
||||
|
||||
if( stats_session->nostat )
|
||||
return;
|
||||
@@ -123,9 +123,9 @@ StatsSession * stats_session = 0;
|
||||
void SessionCreated(PluginInfo & info)
|
||||
{
|
||||
StatsSession * d = new StatsSession();
|
||||
info.request->session->plugin_data.Assign(d);
|
||||
info.cur->session->plugin_data.Assign(d);
|
||||
|
||||
if( !info.request->IsParam(nostat_param) )
|
||||
if( !info.cur->request->IsParam(nostat_param) )
|
||||
{
|
||||
log << log4 << "Stats: created stats plugin data"
|
||||
<< ", plugin id: " << info.plugin_id
|
||||
@@ -141,7 +141,8 @@ void RemoveSession(PluginInfo & info)
|
||||
{
|
||||
// temporarily for debug
|
||||
// sometimes the pointer is null here
|
||||
log << log1 << "Stats: why the info.plugin_data_base is zero? !!!!" << logend;
|
||||
log << log1 << "Stats: why the info.plugin_data_base is zero? !!!!, ses_id: " << info.cur->session->id << logend;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user