fixed: when signal comes winix properly exits

fixed:   when winix exits the session data were not properly destroyed (memory leak)
         we should set request.session pointer to each session when deleting sessions
         from session_container
         the session data were not properly destroyed when winix checked for 
         outdated sessions (and when it was removing them)
fixed:   performance (memcpy used too often)
         in some places there were reserve method used (on std::wstring/std::string objects)
         especially in AssignString() method and TextStream<> object
         if we add a new string we should check the new size
         and only call reserve() if the new size will be greater than existing one
         (plus some constant)
changed: fcgi objects moved to App class (from Request)
         now we use thread safe methods (e.g. FCGX_Accept_r)
added:   log_plugin_call option to the config
         default: false
         when true winix log when a plugin function is called
added:   winix parameter 'nostat' for not calculating statistics
         (useful when making performance tests)


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@680 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
Tomasz Sowa 2010-11-23 21:52:25 +00:00
parent 515d4bab0d
commit 518281e101
39 changed files with 483 additions and 339 deletions

View File

@ -26,7 +26,7 @@ winix: FORCE
@cd plugins/stats ; $(MAKE) -e
@cd plugins/ticket ; $(MAKE) -e
@cd ../ezc/src ; $(MAKE) -e
$(CXX) -shared -o winix.so $(CXXFLAGS) core/*.o db/*.o functions/*.o templates/*.o templatesnotify/*.o ../ezc/src/ezc.a -lfcgi -lpq -lz -lpthread
$(CXX) -shared -o winix.so $(CXXFLAGS) core/*.o db/*.o functions/*.o templates/*.o templatesnotify/*.o ../ezc/src/ezc.a -lfcgi -lpq -lz -lpthread -lfetch
@cd main ; $(MAKE) -e
# use the full path with winix.so
$(CXX) -o winix $(CXXFLAGS) main/*.o /home/tomek/roboczy/winix/winix.so

View File

@ -30,12 +30,11 @@ app.o: ../functions/funthread.h ../functions/template.h
app.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h
app.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h
app.o: ../core/htmlfilter.h ../templates/templates.h
app.o: ../templates/patterncacher.h ../core/item.h
app.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h
app.o: ../core/log.h ../templates/indexpatterns.h ../core/sessionmanager.h
app.o: compress.h getparser.h httpsimpleparser.h postparser.h cookieparser.h
app.o: postmultiparser.h acceptencodingparser.h acceptbaseparser.h plugin.h
app.o: pluginmsg.h
app.o: ../templates/patterncacher.h ../templates/ckeditorgetparser.h
app.o: ../core/httpsimpleparser.h ../core/log.h ../templates/indexpatterns.h
app.o: ../core/sessionmanager.h compress.h getparser.h httpsimpleparser.h
app.o: postparser.h cookieparser.h postmultiparser.h acceptencodingparser.h
app.o: acceptbaseparser.h plugin.h pluginmsg.h
bbcodeparser.o: bbcodeparser.h htmlfilter.h
compress.o: compress.h log.h textstream.h
config.o: config.h confparser.h htmlfilter.h log.h textstream.h plugin.h
@ -49,10 +48,7 @@ config.o: mounts.h mount.h mountparser.h users.h ugcontainer.h
config.o: lastcontainer.h groups.h group.h loadavg.h sessionmanager.h
config.o: sessioncontainer.h ../functions/functions.h
config.o: ../functions/functionbase.h ../core/request.h ../core/config.h
config.o: ../core/system.h ../core/notify.h ../../ezc/src/ezc.h
config.o: ../../ezc/src/utf8.h ../../ezc/src/generator.h
config.o: ../../ezc/src/pattern.h ../../ezc/src/stringconv.h
config.o: ../../ezc/src/functions.h ../../ezc/src/funinfo.h
config.o: ../core/system.h ../core/notify.h ../../ezc/src/utf8.h
config.o: ../functions/functionparser.h ../functions/adduser.h
config.o: ../functions/cat.h ../functions/chmod.h ../functions/privchanger.h
config.o: ../functions/chown.h ../functions/ckeditor.h ../functions/cp.h
@ -65,16 +61,15 @@ config.o: ../functions/run.h ../functions/stat.h ../functions/subject.h
config.o: ../functions/funthread.h ../functions/template.h
config.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h
config.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h
config.o: ../core/htmlfilter.h ../templates/templates.h
config.o: ../templates/patterncacher.h ../core/item.h
config.o: ../core/htmlfilter.h ../templates/templates.h ../../ezc/src/ezc.h
config.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
config.o: ../../ezc/src/stringconv.h ../../ezc/src/functions.h
config.o: ../../ezc/src/funinfo.h ../templates/patterncacher.h
config.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h
config.o: ../core/log.h ../templates/indexpatterns.h
config.o: ../templates/localefilter.h ../templates/locale.h
config.o: ../core/confparser.h ../core/sessionmanager.h
confparser.o: confparser.h misc.h item.h ../../ezc/src/ezc.h
confparser.o: ../../ezc/src/utf8.h ../../ezc/src/generator.h
confparser.o: ../../ezc/src/pattern.h ../../ezc/src/stringconv.h
confparser.o: ../../ezc/src/functions.h ../../ezc/src/funinfo.h
confparser.o: confparser.h misc.h item.h ../../ezc/src/utf8.h
dircontainer.o: dircontainer.h item.h log.h textstream.h
dirs.o: dirs.h item.h dircontainer.h ../db/db.h ../db/dbbase.h ../db/dbconn.h
dirs.o: ../db/dbtextstream.h ../core/textstream.h misc.h ../core/error.h
@ -100,10 +95,7 @@ httpsimpleparser.o: httpsimpleparser.h
item.o: item.h misc.h
lastcontainer.o: lastcontainer.h log.h textstream.h misc.h item.h
loadavg.o: loadavg.h log.h textstream.h
log.o: log.h textstream.h ../../ezc/src/ezc.h ../../ezc/src/utf8.h
log.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h item.h
log.o: ../../ezc/src/stringconv.h ../../ezc/src/functions.h
log.o: ../../ezc/src/funinfo.h
log.o: log.h textstream.h ../../ezc/src/utf8.h
misc.o: misc.h item.h log.h textstream.h ../templates/templates.h
misc.o: ../../ezc/src/ezc.h ../../ezc/src/utf8.h ../../ezc/src/generator.h
misc.o: ../../ezc/src/pattern.h ../../ezc/src/stringconv.h
@ -114,8 +106,8 @@ misc.o: ../core/log.h ../templates/indexpatterns.h
misc.o: ../templates/localefilter.h ../templates/locale.h
misc.o: ../core/confparser.h ../core/config.h ../db/db.h ../db/dbbase.h
misc.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
misc.o: ../core/error.h ../db/dbitemquery.h ../core/item.h
misc.o: ../db/dbitemcolumns.h ../core/user.h ../core/group.h ../core/thread.h
misc.o: ../core/error.h ../db/dbitemquery.h ../db/dbitemcolumns.h
misc.o: ../core/user.h ../core/group.h ../core/thread.h
misc.o: ../core/dircontainer.h ../core/ugcontainer.h ../core/request.h
misc.o: ../core/system.h ../core/sessionmanager.h
mount.o: mount.h misc.h item.h
@ -139,10 +131,7 @@ mounts.o: system.h users.h ugcontainer.h lastcontainer.h groups.h group.h
mounts.o: loadavg.h sessionmanager.h sessioncontainer.h
mounts.o: ../functions/functions.h ../functions/functionbase.h
mounts.o: ../core/request.h ../core/config.h ../core/system.h
mounts.o: ../core/notify.h ../../ezc/src/ezc.h ../../ezc/src/utf8.h
mounts.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
mounts.o: ../../ezc/src/stringconv.h ../../ezc/src/functions.h
mounts.o: ../../ezc/src/funinfo.h ../functions/functionparser.h
mounts.o: ../core/notify.h ../../ezc/src/utf8.h ../functions/functionparser.h
mounts.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h
mounts.o: ../functions/privchanger.h ../functions/chown.h
mounts.o: ../functions/ckeditor.h ../functions/cp.h
@ -155,8 +144,10 @@ mounts.o: ../functions/run.h ../functions/stat.h ../functions/subject.h
mounts.o: ../functions/funthread.h ../functions/template.h
mounts.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h
mounts.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h
mounts.o: ../core/htmlfilter.h ../templates/templates.h
mounts.o: ../templates/patterncacher.h ../core/item.h
mounts.o: ../core/htmlfilter.h ../templates/templates.h ../../ezc/src/ezc.h
mounts.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
mounts.o: ../../ezc/src/stringconv.h ../../ezc/src/functions.h
mounts.o: ../../ezc/src/funinfo.h ../templates/patterncacher.h
mounts.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h
mounts.o: ../core/log.h ../templates/indexpatterns.h
mounts.o: ../templates/localefilter.h ../templates/locale.h
@ -186,10 +177,7 @@ plugin.o: mounts.h mount.h mountparser.h users.h ugcontainer.h
plugin.o: lastcontainer.h groups.h group.h loadavg.h sessionmanager.h
plugin.o: sessioncontainer.h ../functions/functions.h
plugin.o: ../functions/functionbase.h ../core/request.h ../core/config.h
plugin.o: ../core/system.h ../core/notify.h ../../ezc/src/ezc.h
plugin.o: ../../ezc/src/utf8.h ../../ezc/src/generator.h
plugin.o: ../../ezc/src/pattern.h ../../ezc/src/stringconv.h
plugin.o: ../../ezc/src/functions.h ../../ezc/src/funinfo.h
plugin.o: ../core/system.h ../core/notify.h ../../ezc/src/utf8.h
plugin.o: ../functions/functionparser.h ../functions/adduser.h
plugin.o: ../functions/cat.h ../functions/chmod.h ../functions/privchanger.h
plugin.o: ../functions/chown.h ../functions/ckeditor.h ../functions/cp.h
@ -202,8 +190,10 @@ plugin.o: ../functions/run.h ../functions/stat.h ../functions/subject.h
plugin.o: ../functions/funthread.h ../functions/template.h
plugin.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h
plugin.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h
plugin.o: ../core/htmlfilter.h ../templates/templates.h
plugin.o: ../templates/patterncacher.h ../core/item.h
plugin.o: ../core/htmlfilter.h ../templates/templates.h ../../ezc/src/ezc.h
plugin.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
plugin.o: ../../ezc/src/stringconv.h ../../ezc/src/functions.h
plugin.o: ../../ezc/src/funinfo.h ../templates/patterncacher.h
plugin.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h
plugin.o: ../core/log.h ../templates/indexpatterns.h
plugin.o: ../templates/localefilter.h ../templates/locale.h
@ -219,10 +209,7 @@ plugindata.o: ../core/ugcontainer.h mounts.h mount.h mountparser.h users.h
plugindata.o: ugcontainer.h lastcontainer.h groups.h group.h loadavg.h
plugindata.o: sessionmanager.h sessioncontainer.h ../functions/functions.h
plugindata.o: ../functions/functionbase.h ../core/request.h ../core/config.h
plugindata.o: ../core/system.h ../core/notify.h ../../ezc/src/ezc.h
plugindata.o: ../../ezc/src/utf8.h ../../ezc/src/generator.h
plugindata.o: ../../ezc/src/pattern.h ../../ezc/src/stringconv.h
plugindata.o: ../../ezc/src/functions.h ../../ezc/src/funinfo.h
plugindata.o: ../core/system.h ../core/notify.h ../../ezc/src/utf8.h
plugindata.o: ../functions/functionparser.h ../functions/adduser.h
plugindata.o: ../functions/cat.h ../functions/chmod.h
plugindata.o: ../functions/privchanger.h ../functions/chown.h
@ -238,17 +225,17 @@ plugindata.o: ../functions/template.h ../functions/tinymce.h
plugindata.o: ../functions/uname.h ../functions/upload.h
plugindata.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h
plugindata.o: ../core/htmlfilter.h ../templates/templates.h
plugindata.o: ../templates/patterncacher.h ../core/item.h
plugindata.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h
plugindata.o: ../core/log.h ../templates/indexpatterns.h
plugindata.o: ../templates/localefilter.h ../templates/locale.h
plugindata.o: ../core/confparser.h ../core/sessionmanager.h
plugindata.o: ../../ezc/src/ezc.h ../../ezc/src/generator.h
plugindata.o: ../../ezc/src/pattern.h ../../ezc/src/stringconv.h
plugindata.o: ../../ezc/src/functions.h ../../ezc/src/funinfo.h
plugindata.o: ../templates/patterncacher.h ../templates/ckeditorgetparser.h
plugindata.o: ../core/httpsimpleparser.h ../core/log.h
plugindata.o: ../templates/indexpatterns.h ../templates/localefilter.h
plugindata.o: ../templates/locale.h ../core/confparser.h
plugindata.o: ../core/sessionmanager.h
postmultiparser.o: postmultiparser.h error.h requesttypes.h config.h
postmultiparser.o: confparser.h htmlfilter.h log.h textstream.h
postmultiparser.o: ../../ezc/src/ezc.h ../../ezc/src/utf8.h
postmultiparser.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h item.h
postmultiparser.o: ../../ezc/src/stringconv.h ../../ezc/src/functions.h
postmultiparser.o: ../../ezc/src/funinfo.h misc.h
postmultiparser.o: ../../ezc/src/utf8.h misc.h item.h
rebus.o: log.h textstream.h rebus.h misc.h item.h request.h requesttypes.h
rebus.o: session.h error.h user.h plugindata.h config.h confparser.h
rebus.o: htmlfilter.h
@ -264,13 +251,10 @@ request.o: mountparser.h users.h ugcontainer.h lastcontainer.h groups.h
request.o: group.h loadavg.h sessionmanager.h sessioncontainer.h
request.o: ../functions/functions.h ../functions/functionbase.h
request.o: ../core/request.h ../core/config.h ../core/system.h
request.o: ../core/notify.h ../../ezc/src/ezc.h ../../ezc/src/utf8.h
request.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
request.o: ../../ezc/src/stringconv.h ../../ezc/src/functions.h
request.o: ../../ezc/src/funinfo.h ../functions/functionparser.h
request.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h
request.o: ../functions/privchanger.h ../functions/chown.h
request.o: ../functions/ckeditor.h ../functions/cp.h
request.o: ../core/notify.h ../../ezc/src/utf8.h
request.o: ../functions/functionparser.h ../functions/adduser.h
request.o: ../functions/cat.h ../functions/chmod.h ../functions/privchanger.h
request.o: ../functions/chown.h ../functions/ckeditor.h ../functions/cp.h
request.o: ../functions/createthread.h ../functions/default.h
request.o: ../functions/download.h ../functions/emacs.h ../functions/last.h
request.o: ../functions/login.h ../functions/logout.h ../functions/ls.h
@ -280,19 +264,22 @@ request.o: ../functions/run.h ../functions/stat.h ../functions/subject.h
request.o: ../functions/funthread.h ../functions/template.h
request.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h
request.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h
request.o: ../core/htmlfilter.h ../templates/templates.h
request.o: ../templates/patterncacher.h ../core/item.h
request.o: ../core/htmlfilter.h ../templates/templates.h ../../ezc/src/ezc.h
request.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
request.o: ../../ezc/src/stringconv.h ../../ezc/src/functions.h
request.o: ../../ezc/src/funinfo.h ../templates/patterncacher.h
request.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h
request.o: ../core/log.h ../templates/indexpatterns.h
request.o: ../templates/localefilter.h ../templates/locale.h
request.o: ../core/confparser.h ../core/sessionmanager.h
session.o: session.h item.h error.h user.h plugindata.h rebus.h misc.h
sessioncontainer.o: sessioncontainer.h session.h item.h error.h user.h
sessioncontainer.o: plugindata.h rebus.h lastcontainer.h log.h textstream.h
sessioncontainer.o: misc.h
sessioncontainer.o: plugindata.h rebus.h lastcontainer.h request.h
sessioncontainer.o: requesttypes.h config.h confparser.h htmlfilter.h
sessioncontainer.o: textstream.h log.h misc.h
sessionmanager.o: sessionmanager.h sessioncontainer.h session.h item.h
sessionmanager.o: error.h user.h plugindata.h rebus.h lastcontainer.h
sessionmanager.o: config.h confparser.h htmlfilter.h request.h requesttypes.h
sessionmanager.o: request.h requesttypes.h config.h confparser.h htmlfilter.h
sessionmanager.o: textstream.h system.h dirs.h dircontainer.h ../db/db.h
sessionmanager.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h
sessionmanager.o: ../core/textstream.h misc.h ../core/error.h log.h
@ -303,35 +290,35 @@ sessionmanager.o: mount.h mountparser.h users.h ugcontainer.h groups.h
sessionmanager.o: group.h loadavg.h sessionparser.h plugin.h pluginmsg.h
sessionmanager.o: ../functions/functions.h ../functions/functionbase.h
sessionmanager.o: ../core/request.h ../core/config.h ../core/system.h
sessionmanager.o: ../core/notify.h ../../ezc/src/ezc.h ../../ezc/src/utf8.h
sessionmanager.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
sessionmanager.o: ../../ezc/src/stringconv.h ../../ezc/src/functions.h
sessionmanager.o: ../../ezc/src/funinfo.h ../functions/functionparser.h
sessionmanager.o: ../functions/adduser.h ../functions/cat.h
sessionmanager.o: ../functions/chmod.h ../functions/privchanger.h
sessionmanager.o: ../functions/chown.h ../functions/ckeditor.h
sessionmanager.o: ../functions/cp.h ../functions/createthread.h
sessionmanager.o: ../functions/default.h ../functions/download.h
sessionmanager.o: ../functions/emacs.h ../functions/last.h
sessionmanager.o: ../functions/login.h ../functions/logout.h
sessionmanager.o: ../functions/ls.h ../functions/mkdir.h ../functions/mv.h
sessionmanager.o: ../functions/node.h ../functions/priv.h
sessionmanager.o: ../functions/reload.h ../functions/rm.h ../functions/run.h
sessionmanager.o: ../functions/stat.h ../functions/subject.h
sessionmanager.o: ../functions/funthread.h ../functions/template.h
sessionmanager.o: ../functions/tinymce.h ../functions/uname.h
sessionmanager.o: ../functions/upload.h ../functions/uptime.h
sessionmanager.o: ../functions/who.h ../functions/vim.h ../core/htmlfilter.h
sessionmanager.o: ../templates/templates.h ../templates/patterncacher.h
sessionmanager.o: ../core/item.h ../templates/ckeditorgetparser.h
sessionmanager.o: ../core/httpsimpleparser.h ../core/log.h
sessionmanager.o: ../templates/indexpatterns.h ../templates/localefilter.h
sessionmanager.o: ../templates/locale.h ../core/confparser.h
sessionmanager.o: ../core/sessionmanager.h
sessionmanager.o: ../core/notify.h ../../ezc/src/utf8.h
sessionmanager.o: ../functions/functionparser.h ../functions/adduser.h
sessionmanager.o: ../functions/cat.h ../functions/chmod.h
sessionmanager.o: ../functions/privchanger.h ../functions/chown.h
sessionmanager.o: ../functions/ckeditor.h ../functions/cp.h
sessionmanager.o: ../functions/createthread.h ../functions/default.h
sessionmanager.o: ../functions/download.h ../functions/emacs.h
sessionmanager.o: ../functions/last.h ../functions/login.h
sessionmanager.o: ../functions/logout.h ../functions/ls.h
sessionmanager.o: ../functions/mkdir.h ../functions/mv.h ../functions/node.h
sessionmanager.o: ../functions/priv.h ../functions/reload.h ../functions/rm.h
sessionmanager.o: ../functions/run.h ../functions/stat.h
sessionmanager.o: ../functions/subject.h ../functions/funthread.h
sessionmanager.o: ../functions/template.h ../functions/tinymce.h
sessionmanager.o: ../functions/uname.h ../functions/upload.h
sessionmanager.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h
sessionmanager.o: ../core/htmlfilter.h ../templates/templates.h
sessionmanager.o: ../../ezc/src/ezc.h ../../ezc/src/generator.h
sessionmanager.o: ../../ezc/src/pattern.h ../../ezc/src/stringconv.h
sessionmanager.o: ../../ezc/src/functions.h ../../ezc/src/funinfo.h
sessionmanager.o: ../templates/patterncacher.h
sessionmanager.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h
sessionmanager.o: ../core/log.h ../templates/indexpatterns.h
sessionmanager.o: ../templates/localefilter.h ../templates/locale.h
sessionmanager.o: ../core/confparser.h ../core/sessionmanager.h
sessionparser.o: sessionparser.h session.h item.h error.h user.h plugindata.h
sessionparser.o: rebus.h sessioncontainer.h lastcontainer.h users.h
sessionparser.o: ugcontainer.h request.h requesttypes.h config.h confparser.h
sessionparser.o: htmlfilter.h textstream.h ../db/db.h ../db/dbbase.h
sessionparser.o: rebus.h sessioncontainer.h lastcontainer.h request.h
sessionparser.o: requesttypes.h config.h confparser.h htmlfilter.h
sessionparser.o: textstream.h users.h ugcontainer.h ../db/db.h ../db/dbbase.h
sessionparser.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
sessionparser.o: misc.h ../core/error.h log.h ../db/dbitemquery.h
sessionparser.o: ../core/item.h ../db/dbitemcolumns.h ../core/user.h
@ -351,10 +338,10 @@ system.o: ../../ezc/src/pattern.h ../../ezc/src/stringconv.h
system.o: ../../ezc/src/functions.h ../../ezc/src/funinfo.h ../core/mount.h
system.o: ../core/config.h ../templates/misc.h ../templates/localefilter.h
system.o: ../templates/locale.h ../core/confparser.h ../templates/templates.h
system.o: ../templates/patterncacher.h ../core/item.h
system.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h
system.o: ../core/log.h ../templates/indexpatterns.h ../core/request.h
system.o: ../core/system.h ../core/sessionmanager.h
system.o: ../templates/patterncacher.h ../templates/ckeditorgetparser.h
system.o: ../core/httpsimpleparser.h ../core/log.h
system.o: ../templates/indexpatterns.h ../core/request.h ../core/system.h
system.o: ../core/sessionmanager.h
textstream.o: textstream.h misc.h item.h
users.o: users.h user.h ugcontainer.h lastcontainer.h request.h
users.o: requesttypes.h session.h item.h error.h plugindata.h rebus.h

View File

@ -16,15 +16,17 @@
#include "plugin.h"
#include "misc.h"
#include "functions/functions.h"
#include "ezc.h"
#include "utf8.h"
App::App()
{
was_stop_signal = false;
stdout_is_closed = false;
last_sessions_save = std::time(0);
fcgi_socket = -1;
db.SetConn(db_conn);
@ -73,30 +75,27 @@ App::App()
bool App::CreateFCGISocket()
bool App::InitFCGI()
{
const char * sock = config.fcgi_socket.c_str();
unlink(sock);
fcgi_socket = FCGX_OpenSocket(sock, 100); // !! dodac 100 do konfiga
int s = FCGX_OpenSocket(sock, 100);
if( s < 0 )
if( fcgi_socket < 0 )
{
log << log1 << "An error during creating a socket" << logend;
log << log1 << "App: An error during creating a fcgi socket" << logend;
return false;
}
log << log3 << "App: FastCGI socket number: " << fcgi_socket << logend;
chmod(sock, config.fcgi_socket_chmod);
passwd * pw = getpwnam(config.fcgi_socket_user.c_str());
if( !pw )
{
log << log1 << "There is no user: " << config.fcgi_socket_user << logend;
log << log1 << "App: there is no user: " << config.fcgi_socket_user << logend;
return false;
}
@ -104,32 +103,23 @@ bool App::CreateFCGISocket()
if( !gr )
{
log << log1 << "There is no group: " << config.fcgi_socket_group << logend;
log << log1 << "App: there is no group: " << config.fcgi_socket_group << logend;
return false;
}
chown(sock, pw->pw_uid, gr->gr_gid);
if( setuid(pw->pw_uid) < 0 )
if( FCGX_Init() != 0 )
{
log << log1 << "I can't change the user into: " << config.fcgi_socket_user << logend;
log << log1 << "App: FCGX_Init fails" << logend;
return false;
}
/*
if( setgid(gr->gr_gid) < 0 )
if( FCGX_InitRequest(&fcgi_request, fcgi_socket, FCGI_FAIL_ACCEPT_ON_INTR) != 0 )
{
int e = errno;
log << log1 << "I can't change the group into: " << config.fcgi_socket_group << " " << gr->gr_gid << logend;
log << log1 << "errno: " << e << logend;
log << log1 << "App: FCGX_InitRequest fails" << logend;
return false;
}
*/
dup2(s, 0);
return true;
}
@ -142,9 +132,6 @@ bool App::Init()
db_conn.WaitForConnection();
db.LogQueries(config.log_db_query);
if( !CreateFCGISocket() )
return false; // !! dodac logsave do logow
request.Clear();
compress.Init();
system.Init();
@ -178,7 +165,8 @@ return true;
void App::Close()
{
session_manager.SaveSessions();
session_manager.DeleteAllPluginsData();
session_manager.DeleteSessions();
request.Clear();
}
@ -265,8 +253,11 @@ void App::ProcessRequest()
void App::Start()
{
while( FCGX_Accept(&request.in, &request.out, &request.err, &request.env) == 0 )
while( !was_stop_signal && FCGX_Accept_r(&fcgi_request) == 0 )
{
if( was_stop_signal )
break;
system.load_avg.StartRequest();
log << log2 << config.log_delimiter << logend;
@ -383,7 +374,7 @@ void App::Make()
// !! dodac inne informacje (get, post, itp)
// jesli jest debug_info wlaczone to nie robic przekierowan
request.PrintGetTab();
request.PrintEnv();
//request.PrintEnv(); // !! PrintEnv() mozna przeniesc tutaj (do klasy App)
}
}
@ -415,7 +406,7 @@ void App::ReadRequest()
void App::SetEnv(const char * & env, const char * name)
{
const char * v = FCGX_GetParam(name, request.env);
const char * v = FCGX_GetParam(name, fcgi_request.envp);
if( v )
env = v;
@ -430,7 +421,7 @@ void App::ReadEnvVariables()
// we store that values because FCGX_GetParam has O(n) complexity
// with this variables (env_*) we have O(1)
SetEnv(request.env_request_method, "REQUEST_METHOD");
SetEnv(request.env_request_method, "REQUEST_METHOD"); // !! mozna nie uzywac tego, teraz mamy w strukturze fcgi_request
SetEnv(request.env_request_uri, "REQUEST_URI");
SetEnv(request.env_http_cookie, "HTTP_COOKIE");
SetEnv(request.env_remote_addr, "REMOTE_ADDR");
@ -497,12 +488,12 @@ void App::ReadGetPostVars()
// !! dodac metode UTF8 do post_multi_parsera
// (narazie bierze bezposrednio z konfigu)
// w ogole wywalic zaleznosc od konfiga
post_multi_parser.Parse(request.in, request.post_tab, request.post_file_tab);
post_multi_parser.Parse(fcgi_request.in, request.post_tab, request.post_file_tab);
}
else
{
post_parser.UTF8(config.utf8);
post_parser.Parse(request.in, request.post_tab);
post_parser.Parse(fcgi_request.in, request.post_tab);
}
}
}
@ -562,13 +553,13 @@ void App::SendHeaders(bool compressing, Header header)
PrepareSessionCookie();
if( request.send_as_attachment )
FCGX_PutS("Content-Disposition: attachment\r\n", request.out);
FCGX_PutS("Content-Disposition: attachment\r\n", fcgi_request.out);
if( !request.redirect_to.empty() )
{
FCGX_PutS("Status: 301 Moved Permanently\r\n", request.out);
FCGX_PutS("Status: 301 Moved Permanently\r\n", fcgi_request.out);
AssignString(request.redirect_to, request.aredirect_to);
FCGX_FPrintF(request.out, "Location: %s\r\n", request.aredirect_to.c_str());
FCGX_FPrintF(fcgi_request.out, "Location: %s\r\n", request.aredirect_to.c_str());
log << log2 << "Redirect to: " << request.redirect_to << logend;
}
else
@ -578,9 +569,9 @@ void App::SendHeaders(bool compressing, Header header)
AssignString(config.http_header_send_file, temp);
AssignString(request.x_sendfile, temp2);
FCGX_FPrintF(request.out, "%s: %s\r\n", temp.c_str(), temp2.c_str());
FCGX_FPrintF(fcgi_request.out, "%s: %s\r\n", temp.c_str(), temp2.c_str());
FCGX_PutS("Status: 200 OK\r\n", request.out);
FCGX_PutS("Status: 200 OK\r\n", fcgi_request.out);
log << log2 << "Sending file: " << request.x_sendfile << logend;
}
else
@ -588,30 +579,30 @@ void App::SendHeaders(bool compressing, Header header)
switch( header )
{
case h_404:
FCGX_PutS("Status: 404 Not Found\r\n", request.out);
FCGX_PutS("Content-Type: text/html\r\n", request.out);
FCGX_PutS("Status: 404 Not Found\r\n", fcgi_request.out);
FCGX_PutS("Content-Type: text/html\r\n", fcgi_request.out);
log << log2 << "Request: response: 404 Not Found" << logend;
break;
case h_403:
FCGX_PutS("Status: 403 Forbidden\r\n", request.out);
FCGX_PutS("Content-Type: text/html\r\n", request.out);
FCGX_PutS("Status: 403 Forbidden\r\n", fcgi_request.out);
FCGX_PutS("Content-Type: text/html\r\n", fcgi_request.out);
log << log2 << "Request: response: 403 Forbidden" << logend;
break;
default:
FCGX_PutS("Status: 200 OK\r\n", request.out);
FCGX_PutS("Status: 200 OK\r\n", fcgi_request.out);
if( request.role != Request::authorizer )
FCGX_PutS("Content-Type: text/html\r\n", request.out);
FCGX_PutS("Content-Type: text/html\r\n", fcgi_request.out);
}
}
if( compressing )
FCGX_PutS("Content-Encoding: deflate\r\n", request.out);
FCGX_PutS("Content-Encoding: deflate\r\n", fcgi_request.out);
FCGX_PutS(request.headers.CStr(), request.out);
FCGX_PutS("\r\n", request.out);
FCGX_PutS(request.headers.CStr(), fcgi_request.out);
FCGX_PutS("\r\n", fcgi_request.out);
}
@ -656,9 +647,9 @@ void App::FilterCompressSend(bool compressing, const std::wstring & source_ref)
Ezc::WideToUTF8(*source, temp);
if( compressing )
compress.CompressAndPut(temp.c_str(), temp.length(), request.out);
compress.CompressAndPut(temp.c_str(), temp.length(), fcgi_request.out);
else
FCGX_PutS(temp.c_str(), request.out);
FCGX_PutS(temp.c_str(), fcgi_request.out);
}
@ -971,3 +962,9 @@ bool App::Demonize()
return true;
}
void App::WasStopSignal()
{
was_stop_signal = true;
}

View File

@ -18,6 +18,7 @@
#include <pwd.h>
#include <grp.h>
#include <errno.h>
#include <fcgiapp.h>
#include "config.h"
#include "system.h"
@ -47,12 +48,14 @@ public:
App();
bool InitFCGI();
bool DropPrivileges();
bool Init();
void Start();
void Close();
bool DropPrivileges();
void LogUserGroups();
bool Demonize();
void WasStopSignal();
// configuration read from a config file
Config config;
@ -120,12 +123,13 @@ private:
Compress compress;
HTMLFilter html_filter;
std::wstring clean_html, html_with_debug;
volatile bool was_stop_signal;
FCGX_Request fcgi_request;
int fcgi_socket;
bool CreateFCGISocket();
void ProcessRequestThrow();
void ProcessRequest();
bool BaseUrlRedirect();
void DeleteAllPluginsData();
void MakePage();
void Make();
void SaveSessionsIfNeeded(); // !! wywalic do managara sesji??

View File

@ -107,6 +107,7 @@ void Config::AssignValues(bool stdout_is_closed)
log_request = Int(L"log_request", 1);
log_stdout = Bool(L"log_stdout", false);
log_db_query = Bool(L"log_db_query", false);
log_plugin_call = Bool(L"log_plugin_call", false);
post_file_max = Size(L"post_file_max", 8388608); // 8 MB
auth_simplefs_dir = Text(L"auth_simplefs_dir");

View File

@ -64,6 +64,10 @@ public:
// default: false
bool log_db_query;
// logging when a plugin function is called
// default: false
bool log_plugin_call;
// request delimiter in the log file, default "---------"
std::wstring log_delimiter;

View File

@ -11,7 +11,7 @@
#include <wchar.h>
#include "confparser.h"
#include "misc.h"
#include "ezc.h"
#include "utf8.h"

View File

@ -55,7 +55,11 @@ void HTMLFilter::Deinit()
void HTMLFilter::Filter(const std::wstring & in, std::wstring & out)
{
out.reserve(in.size() * 2 + 1);
size_t out_projected_len = in.size() * 2 + 1;
if( out.capacity() < out_projected_len )
out.reserve(out_projected_len);
Filter(in.c_str(), out);
}

View File

@ -10,7 +10,7 @@
#include "log.h"
#include <ctime>
#include <string.h>
#include "ezc.h"
#include "utf8.h"
Log::Log()
@ -182,6 +182,15 @@ Log & Log::operator<<(Manipulators m)
case logend:
buffer << '\n';
lines += 1;
//if( lines > 3000 )
{
SaveLog();
buffer.Clear();
item = 0;
lines = 0;
}
break;
case logsavenow:

View File

@ -108,7 +108,6 @@ return buffer_;
void AssignString(const char * src, std::wstring & dst, bool clear)
{
size_t len;
@ -117,7 +116,9 @@ size_t len;
dst.clear();
for(len=0 ; src[len] ; ++len){}
dst.reserve(len);
if( dst.capacity() < dst.size() + len )
dst.reserve(dst.size() + len + 128);
for( ; *src ; ++src )
dst += static_cast<unsigned char>(*src);
@ -129,7 +130,8 @@ void AssignString(const std::string & src, std::wstring & dst, bool clear)
if( clear )
dst.clear();
dst.reserve(src.size());
if( dst.capacity() < dst.size() + src.size() )
dst.reserve(dst.size() + src.size() + 128);
for(size_t i=0 ; i<src.size() ; ++i )
dst += static_cast<unsigned char>(src[i]);
@ -144,7 +146,9 @@ size_t len;
dst.clear();
for(len=0 ; src[len] ; ++len){}
dst.reserve(len);
if( dst.capacity() < dst.size() + len )
dst.reserve(dst.size() + len + 128);
for( ; *src ; ++src )
dst += static_cast<char>(*src);
@ -156,7 +160,8 @@ void AssignString(const std::wstring & src, std::string & dst, bool clear)
if( clear )
dst.clear();
dst.reserve(src.size());
if( dst.capacity() < dst.size() + src.size() )
dst.reserve(dst.size() + src.size() + 128);
for(size_t i=0 ; i<src.size() ; ++i )
dst += static_cast<char>(src[i]);
@ -164,6 +169,7 @@ void AssignString(const std::wstring & src, std::string & dst, bool clear)
void AssignString(const std::string & src, std::string & dst, bool clear)
{
if( clear )

View File

@ -286,7 +286,7 @@ void MountParser::ReadFs()
if( mount.fs != -1 )
{
log << log1 << "MP: file system: " << (*mount_fs_tab)[mount.fs] << logend;
log << log2 << "MP: file system: " << (*mount_fs_tab)[mount.fs] << logend;
}
else
{

View File

@ -16,7 +16,7 @@
#include "notify.h"
#include "misc.h"
#include "request.h"
#include "ezc.h"
#include "utf8.h"

View File

@ -32,7 +32,7 @@ size_t i;
Plugin::Plugin()
{
current_plugin = -1;
request = 0;
request = 0;
db = 0;
config = 0;
@ -91,6 +91,8 @@ void Plugin::SetSessionManager(SessionManager * psession_manager)
}
bool Plugin::SetPointers(PluginInfo & info)
{
// for safety we call a plugin function only when all our pointers are not null
@ -247,6 +249,9 @@ void Plugin::Call(int message, Slots::iterator & slot)
if( !slot->second.is_running )
{
if( config->log_plugin_call )
log << log3 << "Plugin: calling plugin id: " << slot->second.index << ", message: " << message << logend;
slot->second.is_running = true;
if( slot->second.fun1 )
@ -256,6 +261,10 @@ void Plugin::Call(int message, Slots::iterator & slot)
slot->second.fun2();
slot->second.is_running = false;
if( config->log_plugin_call )
log << log3 << "Plugin: returning from plugin id: " << slot->second.index << ", message: " << message << logend;
}
else
{
@ -348,6 +357,9 @@ void Plugin::Assign(int message, Fun1 fun1)
{
Slot s;
if( current_plugin == -1 )
return;
s.fun1 = fun1;
s.index = current_plugin;
@ -360,6 +372,9 @@ void Plugin::Assign(int message, Fun2 fun2)
{
Slot s;
if( current_plugin == -1 )
return;
s.fun2 = fun2;
s.index = current_plugin;

View File

@ -42,6 +42,7 @@
#define WINIX_SESSION_CHANGED 3002
// the winix is closing
// the is not any session available (request->session is null)
#define WINIX_CLOSE 3004
// item was removed (rm function)

View File

@ -9,7 +9,7 @@
#include "postmultiparser.h"
#include "log.h"
#include "ezc.h"
#include "utf8.h"
#include "misc.h"

View File

@ -197,7 +197,7 @@ void Request::PrintGetTab()
debug << '\n';
}
/*
void Request::PrintEnv()
{
char ** e;
@ -209,7 +209,7 @@ char ** e;
debug << '\n';
}
*/
bool Request::AllPostVarEmpty()
@ -227,7 +227,7 @@ return true;
bool Request::IsParam(const wchar_t * param_name)
{
ParamTab::iterator i;
ParamTab::iterator i;
for(i=param_tab.begin() ; i!=param_tab.end() ; ++i)
{
@ -241,7 +241,7 @@ return false;
bool Request::IsParam(const std::wstring & param_name)
{
ParamTab::iterator i;
ParamTab::iterator i;
for(i=param_tab.begin() ; i!=param_tab.end() ; ++i)
{

View File

@ -35,8 +35,8 @@ struct Request
size_t id;
FCGX_Stream * in, * out, * err;
FCGX_ParamArray env; // defined as 'char **'
//FCGX_Stream * in, * out, * err;
//FCGX_ParamArray env; // defined as 'char **'
// !! moze pozbyc sie tego none?
enum Method { get, post, head, none } method;
@ -120,7 +120,7 @@ struct Request
// for debugging
void PrintGetTab();
void PrintEnv();
//void PrintEnv();
bool IsParam(const wchar_t * param_name);

View File

@ -18,6 +18,10 @@
#include "rebus.h"
// when deleting Sessions you should set request.session into the session object as well
// this allows to delete plugins session data
// because a session object has plugin_data object
// and in its destructor the plugin.Call(WINIX_SESSION_REMOVE) is called
struct Session
{
// 0 - means that there is no session

View File

@ -13,11 +13,43 @@
SessionContainer::SessionContainer()
{
request = 0;
}
void SessionContainer::SetRequest(Request * prequest)
{
request = prequest;
}
void SessionContainer::Clear()
{
table.clear();
Table::iterator inext, i = table.begin();
// don't use table.clear();
// because plugins session data would not be erased
while( i != table.end() )
{
inext = i;
++inext;
request->session = &(*i);
table.erase(i);
i = inext;
}
// erasing all indexes
index_id.clear();
index_time.clear();
request->session = 0;
}
@ -89,6 +121,7 @@ void SessionContainer::DelFirstByTimeInterval(time_t interval, bool skip_remembe
IndexTime::iterator i = index_time.begin();
IndexTime::iterator iold;
time_t limit = std::time(0) - interval;
Session * old_session = request->session;
while( i != index_time.end() && i->second->last_time < limit )
{
@ -106,12 +139,16 @@ time_t limit = std::time(0) - interval;
// we're logging session.id (call this before table.erase())
DelFromIdIndex(iold->second);
request->session = &(*iold->second);
table.erase(iold->second);
request->session = 0;
index_time.erase(iold);
log << log3 << "SC: deleted index_time for session id: " << id << logend;
log << log3 << "SC: deleted session, id: " << id << logend;
}
request->session = old_session;
}
@ -119,7 +156,7 @@ void SessionContainer::DelFromIdIndex(SessionContainer::Iterator iter)
{
IndexId::iterator i;
for( i = index_id.begin() ; i!=index_id.end() ; ++i)
for(i = index_id.begin() ; i!=index_id.end() ; ++i)
{
if( i->second == iter )
{

View File

@ -17,12 +17,16 @@
#include "session.h"
#include "lastcontainer.h"
#include "request.h"
class SessionContainer
{
public:
public:
// when deleting Sessions you should set request.session into the session object
// this allows to delete plugins session data
// because a session object has plugin_data object
// and in its destructor the plugin.Call(WINIX_SESSION_REMOVE) is called
typedef std::list<Session> Table;
typedef Table::iterator Iterator;
typedef Table::size_type TableSize;
@ -40,11 +44,17 @@ private:
IndexId index_id;
IndexTime index_time;
Request * request;
void DelFromIdIndex(Iterator iter);
public:
SessionContainer();
void SetRequest(Request * prequest);
void Clear();
TableSize Size();

View File

@ -29,6 +29,7 @@ SessionManager::SessionManager()
void SessionManager::SetRequest(Request * prequest)
{
request = prequest;
session_tab.SetRequest(prequest);
}
@ -234,8 +235,10 @@ void SessionManager::DeleteOldSessions()
void SessionManager::DeleteAllPluginsData()
void SessionManager::DeleteSessions()
{
// first we delete all plugins date
/*
SessionContainer::Iterator i = session_tab.Begin();
Session * old_session = request->session;
@ -247,6 +250,12 @@ void SessionManager::DeleteAllPluginsData()
}
request->session = old_session;
*/
// and now we delete all sessions
session_tab.Clear();
}

View File

@ -47,7 +47,7 @@ public:
void SetLastContainer(LastContainer * plast_container);
void SetSession();
void DeleteAllPluginsData();
void DeleteSessions(); // deleting all sessions
void DeleteOldSessions();
void LoadSessions();

View File

@ -238,7 +238,8 @@ return *this;
template<class StringType>
TextStream<StringType> & TextStream<StringType>::Write(const TextStream<StringType>::CharType * buf, size_t len)
{
buffer.reserve(buffer.size() + len);
if( buffer.capacity() < buffer.size() + len )
buffer.reserve(buffer.size() + len + 256); // !! add some constant
for(size_t i=0 ; i<len ; ++i)
buffer += buf[i];

View File

@ -7,10 +7,7 @@ db.o: ../core/user.h ../core/group.h ../core/thread.h ../core/dircontainer.h
db.o: ../core/ugcontainer.h ../core/log.h ../core/misc.h
dbbase.o: dbbase.h dbconn.h dbtextstream.h ../core/textstream.h
dbbase.o: ../core/misc.h ../core/item.h ../core/error.h ../core/log.h
dbbase.o: ../core/textstream.h ../core/log.h ../../ezc/src/ezc.h
dbbase.o: ../../ezc/src/utf8.h ../../ezc/src/generator.h
dbbase.o: ../../ezc/src/pattern.h ../../ezc/src/stringconv.h
dbbase.o: ../../ezc/src/functions.h ../../ezc/src/funinfo.h
dbbase.o: ../core/textstream.h ../core/log.h ../../ezc/src/utf8.h
dbconn.o: dbconn.h dbtextstream.h ../core/textstream.h ../core/misc.h
dbconn.o: ../core/item.h ../core/log.h ../core/error.h ../core/log.h
dbconn.o: ../core/textstream.h
@ -20,7 +17,4 @@ dbitemcolumns.o: ../core/item.h ../core/error.h ../core/log.h
dbitemcolumns.o: ../core/textstream.h
dbitemquery.o: dbitemquery.h ../core/item.h
dbtextstream.o: dbtextstream.h ../core/textstream.h ../core/misc.h
dbtextstream.o: ../core/item.h ../../ezc/src/ezc.h ../../ezc/src/utf8.h
dbtextstream.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
dbtextstream.o: ../../ezc/src/stringconv.h ../../ezc/src/functions.h
dbtextstream.o: ../../ezc/src/funinfo.h
dbtextstream.o: ../core/item.h ../../ezc/src/utf8.h

View File

@ -13,7 +13,7 @@
#include "dbbase.h"
#include "core/log.h"
#include "core/error.h"
#include "ezc.h"
#include "utf8.h"
DbBase::DbBase()

View File

@ -8,7 +8,7 @@
*/
#include "dbtextstream.h"
#include "ezc.h"
#include "utf8.h"
DbTextStream::DbTextStream()

View File

@ -241,9 +241,9 @@ emacs.o: subject.h funthread.h template.h tinymce.h uname.h upload.h uptime.h
emacs.o: who.h vim.h ../core/htmlfilter.h ../core/mount.h ../templates/misc.h
emacs.o: ../templates/localefilter.h ../templates/locale.h
emacs.o: ../core/confparser.h ../core/system.h ../templates/templates.h
emacs.o: ../templates/patterncacher.h ../core/item.h
emacs.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h
emacs.o: ../core/log.h ../templates/indexpatterns.h ../core/sessionmanager.h
emacs.o: ../templates/patterncacher.h ../templates/ckeditorgetparser.h
emacs.o: ../core/httpsimpleparser.h ../core/log.h
emacs.o: ../templates/indexpatterns.h ../core/sessionmanager.h
emacs.o: ../core/sessioncontainer.h
functionbase.o: functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
functionbase.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
@ -327,9 +327,9 @@ functions.o: ../core/log.h ../core/misc.h ../core/plugin.h
functions.o: ../core/pluginmsg.h ../core/sessionmanager.h
functions.o: ../core/sessioncontainer.h ../functions/functions.h
functions.o: ../templates/templates.h ../templates/patterncacher.h
functions.o: ../core/item.h ../templates/ckeditorgetparser.h
functions.o: ../core/httpsimpleparser.h ../core/log.h
functions.o: ../templates/indexpatterns.h ../core/sessionmanager.h
functions.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h
functions.o: ../core/log.h ../templates/indexpatterns.h
functions.o: ../core/sessionmanager.h
funthread.o: ../core/misc.h funthread.h functionbase.h ../core/item.h
funthread.o: ../db/db.h ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h
funthread.o: ../core/textstream.h ../core/misc.h ../core/item.h
@ -582,9 +582,8 @@ reload.o: uptime.h who.h vim.h ../core/htmlfilter.h ../core/mount.h
reload.o: ../templates/misc.h ../templates/localefilter.h
reload.o: ../templates/locale.h ../core/confparser.h ../core/system.h
reload.o: ../templates/templates.h ../templates/patterncacher.h
reload.o: ../core/item.h ../templates/ckeditorgetparser.h
reload.o: ../core/httpsimpleparser.h ../core/log.h
reload.o: ../templates/indexpatterns.h ../core/sessionmanager.h
reload.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h
reload.o: ../core/log.h ../templates/indexpatterns.h ../core/sessionmanager.h
reload.o: ../core/sessioncontainer.h
rm.o: rm.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
rm.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h ../core/misc.h
@ -610,7 +609,7 @@ rm.o: ../core/mount.h ../templates/misc.h ../templates/localefilter.h
rm.o: ../templates/locale.h ../core/confparser.h ../core/system.h
rm.o: ../core/plugin.h ../core/pluginmsg.h ../core/sessionmanager.h
rm.o: ../core/sessioncontainer.h ../functions/functions.h
rm.o: ../templates/templates.h ../templates/patterncacher.h ../core/item.h
rm.o: ../templates/templates.h ../templates/patterncacher.h
rm.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h
rm.o: ../core/log.h ../templates/indexpatterns.h ../core/sessionmanager.h
rm.o: ../core/misc.h

View File

@ -18,7 +18,7 @@
#include "core/config.h"
#include "core/system.h"
#include "core/notify.h"
#include "ezc.h"
#include "utf8.h"
class Functions;

View File

@ -34,10 +34,10 @@ main.o: ../functions/funthread.h ../functions/template.h
main.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h
main.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h
main.o: ../core/htmlfilter.h ../templates/templates.h
main.o: ../templates/patterncacher.h ../core/item.h
main.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h
main.o: ../core/log.h ../templates/indexpatterns.h ../core/sessionmanager.h
main.o: ../core/compress.h ../core/getparser.h ../core/httpsimpleparser.h
main.o: ../core/postparser.h ../core/cookieparser.h ../core/postmultiparser.h
main.o: ../templates/patterncacher.h ../templates/ckeditorgetparser.h
main.o: ../core/httpsimpleparser.h ../core/log.h ../templates/indexpatterns.h
main.o: ../core/sessionmanager.h ../core/compress.h ../core/getparser.h
main.o: ../core/httpsimpleparser.h ../core/postparser.h
main.o: ../core/cookieparser.h ../core/postmultiparser.h
main.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
main.o: ../core/plugin.h ../core/pluginmsg.h

View File

@ -11,6 +11,9 @@
#include <ctime>
#include <signal.h>
#include <iostream>
#include <sys/param.h>
#include <cstdio>
#include <fetch.h>
#include "core/log.h"
#include "core/app.h"
@ -29,17 +32,28 @@ Plugin plugin;
App app;
static std::string url_to_fetch_on_exit;
void fetch_page_on_exit()
{
// stupid trick to break FCGX_Accept_r() function
// even with FCGX_InitRequest(..., ..., FCGI_FAIL_ACCEPT_ON_INTR) the FCGX_Accept_r
// doesn't want to break on a signal
// so we request one page from the server for exiting from FCGX_Accept_r
FILE * f = fetchGetURL(url_to_fetch_on_exit.c_str(), "");
if( f )
fclose(f);
}
void signal_term(int)
{
plugin.Call(WINIX_CLOSE);
app.Close();
log.PutDate(log1);
log << "winix stopped" << logend << logsave;
// !! sprawdzic czemu ta flaga zatrzymania nie dzialala
// i sprobowac pozbyc sie tego exita tutaj
exit(0);
FCGX_ShutdownPending();
app.WasStopSignal();
fetch_page_on_exit();
}
@ -86,6 +100,11 @@ int main(int argv, char ** argc)
log.Init(app.config.log_level, app.config.log_file, app.config.log_stdout, app.config.log_request);
nlog.Init(app.config.log_level, app.config.log_notify_file, false, 1);
log << log3 << "-- preparing to start winix --" << logend << logsavenow;
if( !app.InitFCGI() )
return false; // !! dodac logsave do logow
if( !app.DropPrivileges() )
return 3;
@ -108,6 +127,26 @@ int main(int argv, char ** argc)
app.notify.ReadTemplates(); // wrzucic do notify.Init() ?
// ----
/*
struct sigaction act, old_act;
sigemptyset(&act.sa_mask);
act.sa_flags = 0;
act.sa_handler = signal_term;
sigaction(SIGINT, &act, &old_act);
sigemptyset(&act.sa_mask);
act.sa_flags = 0;
act.sa_handler = signal_term;
sigaction(SIGTERM, &act, &old_act);
*/
// ----
Ezc::WideToUTF8(app.config.base_url, url_to_fetch_on_exit);
signal(SIGTERM, signal_term);
signal(SIGINT, signal_term);
@ -120,12 +159,13 @@ int main(int argv, char ** argc)
//app.db.CheckAllUrlSubject();
app.Start();
plugin.Call(WINIX_CLOSE);
app.Close();
log.PutDate(log1);
log << "winix stopped" << logend << logsave;
log << "winix stopped" << logend << logsavenow;
return 0;
}

View File

@ -41,15 +41,12 @@ init.o: ../../functions/template.h ../../functions/tinymce.h
init.o: ../../functions/uname.h ../../functions/upload.h
init.o: ../../functions/uptime.h ../../functions/who.h ../../functions/vim.h
init.o: ../../core/htmlfilter.h ../../templates/templates.h
init.o: ../../templates/patterncacher.h ../../core/item.h
init.o: ../../templates/ckeditorgetparser.h ../../core/httpsimpleparser.h
init.o: ../../core/log.h ../../templates/indexpatterns.h
init.o: ../../core/sessionmanager.h statssession.h ../../core/plugindata.h
init.o: ../../templates/patterncacher.h ../../templates/ckeditorgetparser.h
init.o: ../../core/httpsimpleparser.h ../../core/log.h
init.o: ../../templates/indexpatterns.h ../../core/sessionmanager.h
init.o: statssession.h ../../core/plugindata.h
stats.o: stats.h ../../core/config.h ../../core/log.h ../../core/textstream.h
stats.o: ../../core/misc.h ../../core/item.h ../../../ezc/src/ezc.h
stats.o: ../../../ezc/src/utf8.h ../../../ezc/src/generator.h
stats.o: ../../../ezc/src/pattern.h ../../../ezc/src/stringconv.h
stats.o: ../../../ezc/src/functions.h ../../../ezc/src/funinfo.h
stats.o: ../../core/misc.h ../../core/item.h ../../../ezc/src/utf8.h
templates.o: templates.h ../../core/plugin.h ../../core/pluginmsg.h
templates.o: ../../core/log.h ../../core/plugindata.h ../../core/config.h
templates.o: ../../core/confparser.h ../../core/htmlfilter.h
@ -95,7 +92,7 @@ templates.o: ../../functions/uname.h ../../functions/upload.h
templates.o: ../../functions/uptime.h ../../functions/who.h
templates.o: ../../functions/vim.h ../../core/htmlfilter.h
templates.o: ../../templates/templates.h ../../templates/patterncacher.h
templates.o: ../../core/item.h ../../templates/ckeditorgetparser.h
templates.o: ../../templates/ckeditorgetparser.h
templates.o: ../../core/httpsimpleparser.h ../../core/log.h
templates.o: ../../templates/indexpatterns.h ../../core/sessionmanager.h
templates.o: ../../core/misc.h stats.h

View File

@ -20,7 +20,15 @@
extern "C" void Init(PluginInfo &);
const wchar_t plugin_name[] = L"stats";
static const wchar_t plugin_name[] = L"stats";
// if there is a winix function parameter nostat_param used
// such as: http://mysite.com/uptime/nostat
// then the statistics will not be calculated
// and winix will not log about creating and destroying plugins date
// (useful when making performance tests so it not change the real statistics)
static const wchar_t nostat_param[] = L"nostat";
namespace Stats
@ -87,6 +95,10 @@ StatsSession * stats_session = 0;
return;
stats_session = reinterpret_cast<StatsSession*>(info.plugin_data_base);
stats_session->nostat = info.request->IsParam(nostat_param);
if( stats_session->nostat )
return;
// this simply prevents F5 (refresh) from a webbrowser
if( stats_session->last_visited != -1 &&
@ -113,18 +125,34 @@ void SessionCreated(PluginInfo & info)
StatsSession * d = new StatsSession();
info.request->session->plugin_data.Assign(d);
log << log3 << "created stats plugin data"
<< ", plugin id: " << info.plugin_id
<< ", pointer: " << d << logend;
if( !info.request->IsParam(nostat_param) )
{
log << log3 << "created stats plugin data"
<< ", plugin id: " << info.plugin_id
<< ", pointer: " << d << logend;
}
}
void RemoveSession(PluginInfo & info)
{
log << log1 << "deleting stats plugin data"
<< ", plugin id: " << info.plugin_id
<< ", pointer: " << info.plugin_data_base << logend;
if( !info.plugin_data_base )
{
// temporarily for debug
// sometimes the pointer is null here
log << log1 << "Stats: why the info.plugin_data_base is zero? !!!!" << logend;
return;
}
StatsSession * d = reinterpret_cast<StatsSession*>(info.plugin_data_base);
if( !d->nostat )
{
log << log3 << "deleting stats plugin data"
<< ", plugin id: " << info.plugin_id
<< ", pointer: " << info.plugin_data_base << logend;
}
delete info.plugin_data_base;
}

View File

@ -10,7 +10,7 @@
#include <ctime>
#include "stats.h"
#include "core/log.h"
#include "ezc.h"
#include "utf8.h"
namespace Stats

View File

@ -23,11 +23,13 @@ struct StatsSession : public PluginDataBase
// whether this session has been calculated
bool calculated;
long last_visited;
bool nostat; // is nostat parameter
StatsSession()
{
calculated = false;
last_visited = -1;
nostat = false;
}
};

View File

@ -158,10 +158,9 @@ init.o: ../../functions/template.h ../../functions/tinymce.h
init.o: ../../functions/uname.h ../../functions/upload.h
init.o: ../../functions/uptime.h ../../functions/who.h ../../functions/vim.h
init.o: ../../core/htmlfilter.h ../../templates/templates.h
init.o: ../../templates/patterncacher.h ../../core/item.h
init.o: ../../templates/ckeditorgetparser.h ../../core/httpsimpleparser.h
init.o: ../../core/log.h ../../templates/indexpatterns.h
init.o: ../../core/sessionmanager.h
init.o: ../../templates/patterncacher.h ../../templates/ckeditorgetparser.h
init.o: ../../core/httpsimpleparser.h ../../core/log.h
init.o: ../../templates/indexpatterns.h ../../core/sessionmanager.h
tdb.o: tdb.h ticket.h ../../db/dbbase.h ../../db/dbconn.h
tdb.o: ../../db/dbtextstream.h ../../core/textstream.h ../../core/misc.h
tdb.o: ../../core/item.h ../../core/error.h ../../core/log.h
@ -213,7 +212,7 @@ templates.o: ../../functions/uname.h ../../functions/upload.h
templates.o: ../../functions/uptime.h ../../functions/who.h
templates.o: ../../functions/vim.h ../../core/htmlfilter.h
templates.o: ../../templates/templates.h ../../templates/patterncacher.h
templates.o: ../../core/item.h ../../templates/ckeditorgetparser.h
templates.o: ../../templates/ckeditorgetparser.h
templates.o: ../../core/httpsimpleparser.h ../../core/log.h
templates.o: ../../templates/indexpatterns.h ../../core/sessionmanager.h
ticketconf.o: ticketconf.h

View File

@ -10,16 +10,16 @@ adduser.o: ckeditorgetparser.h ../core/httpsimpleparser.h ../core/log.h
adduser.o: ../core/textstream.h indexpatterns.h ../core/config.h
adduser.o: ../core/confparser.h ../core/htmlfilter.h ../db/db.h
adduser.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h ../core/error.h
adduser.o: ../core/log.h ../db/dbitemquery.h ../core/item.h
adduser.o: ../db/dbitemcolumns.h ../core/group.h ../core/thread.h
adduser.o: ../core/dircontainer.h ../core/ugcontainer.h ../core/request.h
adduser.o: ../core/requesttypes.h ../core/session.h ../core/error.h
adduser.o: ../core/user.h ../core/plugindata.h ../core/rebus.h
adduser.o: ../core/config.h ../core/system.h ../core/dirs.h
adduser.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h
adduser.o: ../core/mount.h ../core/mountparser.h ../core/users.h
adduser.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h
adduser.o: ../core/group.h ../core/loadavg.h ../core/sessionmanager.h
adduser.o: ../core/log.h ../db/dbitemquery.h ../db/dbitemcolumns.h
adduser.o: ../core/group.h ../core/thread.h ../core/dircontainer.h
adduser.o: ../core/ugcontainer.h ../core/request.h ../core/requesttypes.h
adduser.o: ../core/session.h ../core/error.h ../core/user.h
adduser.o: ../core/plugindata.h ../core/rebus.h ../core/config.h
adduser.o: ../core/system.h ../core/dirs.h ../core/dircontainer.h
adduser.o: ../core/request.h ../core/mounts.h ../core/mount.h
adduser.o: ../core/mountparser.h ../core/users.h ../core/ugcontainer.h
adduser.o: ../core/lastcontainer.h ../core/groups.h ../core/group.h
adduser.o: ../core/loadavg.h ../core/sessionmanager.h
adduser.o: ../core/sessioncontainer.h ../core/system.h
dir.o: templates.h ../../ezc/src/ezc.h ../../ezc/src/utf8.h
dir.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h ../../ezc/src/item.h
@ -31,7 +31,7 @@ dir.o: ../core/httpsimpleparser.h ../core/log.h ../core/textstream.h
dir.o: indexpatterns.h ../core/config.h ../core/confparser.h
dir.o: ../core/htmlfilter.h ../db/db.h ../db/dbbase.h ../db/dbconn.h
dir.o: ../db/dbtextstream.h ../core/error.h ../core/log.h ../db/dbitemquery.h
dir.o: ../core/item.h ../db/dbitemcolumns.h ../core/group.h ../core/thread.h
dir.o: ../db/dbitemcolumns.h ../core/group.h ../core/thread.h
dir.o: ../core/dircontainer.h ../core/ugcontainer.h ../core/request.h
dir.o: ../core/requesttypes.h ../core/session.h ../core/error.h
dir.o: ../core/user.h ../core/plugindata.h ../core/rebus.h ../core/config.h
@ -66,7 +66,7 @@ doc.o: ../core/httpsimpleparser.h ../core/log.h ../core/textstream.h
doc.o: indexpatterns.h ../core/config.h ../core/confparser.h
doc.o: ../core/htmlfilter.h ../db/db.h ../db/dbbase.h ../db/dbconn.h
doc.o: ../db/dbtextstream.h ../core/error.h ../core/log.h ../db/dbitemquery.h
doc.o: ../core/item.h ../db/dbitemcolumns.h ../core/group.h ../core/thread.h
doc.o: ../db/dbitemcolumns.h ../core/group.h ../core/thread.h
doc.o: ../core/dircontainer.h ../core/ugcontainer.h ../core/request.h
doc.o: ../core/requesttypes.h ../core/session.h ../core/error.h
doc.o: ../core/user.h ../core/plugindata.h ../core/rebus.h ../core/config.h
@ -93,11 +93,11 @@ item.o: ckeditorgetparser.h ../core/httpsimpleparser.h ../core/log.h
item.o: ../core/textstream.h indexpatterns.h ../core/config.h
item.o: ../core/confparser.h ../core/htmlfilter.h ../db/db.h ../db/dbbase.h
item.o: ../db/dbconn.h ../db/dbtextstream.h ../core/error.h ../core/log.h
item.o: ../db/dbitemquery.h ../core/item.h ../db/dbitemcolumns.h
item.o: ../core/group.h ../core/thread.h ../core/dircontainer.h
item.o: ../core/ugcontainer.h ../core/request.h ../core/requesttypes.h
item.o: ../core/session.h ../core/error.h ../core/user.h ../core/plugindata.h
item.o: ../core/rebus.h ../core/config.h ../core/system.h ../core/dirs.h
item.o: ../db/dbitemquery.h ../db/dbitemcolumns.h ../core/group.h
item.o: ../core/thread.h ../core/dircontainer.h ../core/ugcontainer.h
item.o: ../core/request.h ../core/requesttypes.h ../core/session.h
item.o: ../core/error.h ../core/user.h ../core/plugindata.h ../core/rebus.h
item.o: ../core/config.h ../core/system.h ../core/dirs.h
item.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h
item.o: ../core/mount.h ../core/mountparser.h ../core/users.h
item.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h
@ -114,11 +114,11 @@ last.o: ckeditorgetparser.h ../core/httpsimpleparser.h ../core/log.h
last.o: ../core/textstream.h indexpatterns.h ../core/config.h
last.o: ../core/confparser.h ../core/htmlfilter.h ../db/db.h ../db/dbbase.h
last.o: ../db/dbconn.h ../db/dbtextstream.h ../core/error.h ../core/log.h
last.o: ../db/dbitemquery.h ../core/item.h ../db/dbitemcolumns.h
last.o: ../core/group.h ../core/thread.h ../core/dircontainer.h
last.o: ../core/ugcontainer.h ../core/request.h ../core/requesttypes.h
last.o: ../core/session.h ../core/error.h ../core/user.h ../core/plugindata.h
last.o: ../core/rebus.h ../core/config.h ../core/system.h ../core/dirs.h
last.o: ../db/dbitemquery.h ../db/dbitemcolumns.h ../core/group.h
last.o: ../core/thread.h ../core/dircontainer.h ../core/ugcontainer.h
last.o: ../core/request.h ../core/requesttypes.h ../core/session.h
last.o: ../core/error.h ../core/user.h ../core/plugindata.h ../core/rebus.h
last.o: ../core/config.h ../core/system.h ../core/dirs.h
last.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h
last.o: ../core/mount.h ../core/mountparser.h ../core/users.h
last.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h
@ -142,7 +142,7 @@ ls.o: ../core/httpsimpleparser.h ../core/log.h ../core/textstream.h
ls.o: indexpatterns.h ../core/config.h ../core/confparser.h
ls.o: ../core/htmlfilter.h ../db/db.h ../db/dbbase.h ../db/dbconn.h
ls.o: ../db/dbtextstream.h ../core/error.h ../core/log.h ../db/dbitemquery.h
ls.o: ../core/item.h ../db/dbitemcolumns.h ../core/group.h ../core/thread.h
ls.o: ../db/dbitemcolumns.h ../core/group.h ../core/thread.h
ls.o: ../core/dircontainer.h ../core/ugcontainer.h ../core/request.h
ls.o: ../core/requesttypes.h ../core/session.h ../core/error.h ../core/user.h
ls.o: ../core/plugindata.h ../core/rebus.h ../core/config.h ../core/system.h
@ -161,11 +161,11 @@ misc.o: ckeditorgetparser.h ../core/httpsimpleparser.h ../core/log.h
misc.o: ../core/textstream.h indexpatterns.h ../core/config.h
misc.o: ../core/confparser.h ../core/htmlfilter.h ../db/db.h ../db/dbbase.h
misc.o: ../db/dbconn.h ../db/dbtextstream.h ../core/error.h ../core/log.h
misc.o: ../db/dbitemquery.h ../core/item.h ../db/dbitemcolumns.h
misc.o: ../core/group.h ../core/thread.h ../core/dircontainer.h
misc.o: ../core/ugcontainer.h ../core/request.h ../core/requesttypes.h
misc.o: ../core/session.h ../core/error.h ../core/user.h ../core/plugindata.h
misc.o: ../core/rebus.h ../core/config.h ../core/system.h ../core/dirs.h
misc.o: ../db/dbitemquery.h ../db/dbitemcolumns.h ../core/group.h
misc.o: ../core/thread.h ../core/dircontainer.h ../core/ugcontainer.h
misc.o: ../core/request.h ../core/requesttypes.h ../core/session.h
misc.o: ../core/error.h ../core/user.h ../core/plugindata.h ../core/rebus.h
misc.o: ../core/config.h ../core/system.h ../core/dirs.h
misc.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h
misc.o: ../core/mount.h ../core/mountparser.h ../core/users.h
misc.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h
@ -181,16 +181,15 @@ mount.o: ckeditorgetparser.h ../core/httpsimpleparser.h ../core/log.h
mount.o: ../core/textstream.h indexpatterns.h ../core/config.h
mount.o: ../core/confparser.h ../core/htmlfilter.h ../db/db.h ../db/dbbase.h
mount.o: ../db/dbconn.h ../db/dbtextstream.h ../core/error.h ../core/log.h
mount.o: ../db/dbitemquery.h ../core/item.h ../db/dbitemcolumns.h
mount.o: ../core/group.h ../core/thread.h ../core/dircontainer.h
mount.o: ../core/ugcontainer.h ../core/request.h ../core/requesttypes.h
mount.o: ../core/session.h ../core/error.h ../core/user.h
mount.o: ../core/plugindata.h ../core/rebus.h ../core/config.h
mount.o: ../core/system.h ../core/dirs.h ../core/dircontainer.h
mount.o: ../core/request.h ../core/mounts.h ../core/mount.h
mount.o: ../core/mountparser.h ../core/users.h ../core/ugcontainer.h
mount.o: ../core/lastcontainer.h ../core/groups.h ../core/group.h
mount.o: ../core/loadavg.h ../core/sessionmanager.h
mount.o: ../db/dbitemquery.h ../db/dbitemcolumns.h ../core/group.h
mount.o: ../core/thread.h ../core/dircontainer.h ../core/ugcontainer.h
mount.o: ../core/request.h ../core/requesttypes.h ../core/session.h
mount.o: ../core/error.h ../core/user.h ../core/plugindata.h ../core/rebus.h
mount.o: ../core/config.h ../core/system.h ../core/dirs.h
mount.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h
mount.o: ../core/mount.h ../core/mountparser.h ../core/users.h
mount.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h
mount.o: ../core/group.h ../core/loadavg.h ../core/sessionmanager.h
mount.o: ../core/sessioncontainer.h ../core/system.h ../core/misc.h
patterncacher.o: patterncacher.h ../core/item.h ../../ezc/src/ezc.h
patterncacher.o: ../../ezc/src/utf8.h ../../ezc/src/generator.h
@ -207,11 +206,11 @@ priv.o: ckeditorgetparser.h ../core/httpsimpleparser.h ../core/log.h
priv.o: ../core/textstream.h indexpatterns.h ../core/config.h
priv.o: ../core/confparser.h ../core/htmlfilter.h ../db/db.h ../db/dbbase.h
priv.o: ../db/dbconn.h ../db/dbtextstream.h ../core/error.h ../core/log.h
priv.o: ../db/dbitemquery.h ../core/item.h ../db/dbitemcolumns.h
priv.o: ../core/group.h ../core/thread.h ../core/dircontainer.h
priv.o: ../core/ugcontainer.h ../core/request.h ../core/requesttypes.h
priv.o: ../core/session.h ../core/error.h ../core/user.h ../core/plugindata.h
priv.o: ../core/rebus.h ../core/config.h ../core/system.h ../core/dirs.h
priv.o: ../db/dbitemquery.h ../db/dbitemcolumns.h ../core/group.h
priv.o: ../core/thread.h ../core/dircontainer.h ../core/ugcontainer.h
priv.o: ../core/request.h ../core/requesttypes.h ../core/session.h
priv.o: ../core/error.h ../core/user.h ../core/plugindata.h ../core/rebus.h
priv.o: ../core/config.h ../core/system.h ../core/dirs.h
priv.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h
priv.o: ../core/mount.h ../core/mountparser.h ../core/users.h
priv.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h
@ -243,16 +242,15 @@ rebus.o: ../core/httpsimpleparser.h ../core/log.h ../core/textstream.h
rebus.o: indexpatterns.h ../core/config.h ../core/confparser.h
rebus.o: ../core/htmlfilter.h ../db/db.h ../db/dbbase.h ../db/dbconn.h
rebus.o: ../db/dbtextstream.h ../core/error.h ../core/log.h
rebus.o: ../db/dbitemquery.h ../core/item.h ../db/dbitemcolumns.h
rebus.o: ../core/group.h ../core/thread.h ../core/dircontainer.h
rebus.o: ../core/ugcontainer.h ../core/request.h ../core/requesttypes.h
rebus.o: ../core/session.h ../core/error.h ../core/user.h
rebus.o: ../core/plugindata.h ../core/rebus.h ../core/config.h
rebus.o: ../core/system.h ../core/dirs.h ../core/dircontainer.h
rebus.o: ../core/request.h ../core/mounts.h ../core/mount.h
rebus.o: ../core/mountparser.h ../core/users.h ../core/ugcontainer.h
rebus.o: ../core/lastcontainer.h ../core/groups.h ../core/group.h
rebus.o: ../core/loadavg.h ../core/sessionmanager.h
rebus.o: ../db/dbitemquery.h ../db/dbitemcolumns.h ../core/group.h
rebus.o: ../core/thread.h ../core/dircontainer.h ../core/ugcontainer.h
rebus.o: ../core/request.h ../core/requesttypes.h ../core/session.h
rebus.o: ../core/error.h ../core/user.h ../core/plugindata.h ../core/rebus.h
rebus.o: ../core/config.h ../core/system.h ../core/dirs.h
rebus.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h
rebus.o: ../core/mount.h ../core/mountparser.h ../core/users.h
rebus.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h
rebus.o: ../core/group.h ../core/loadavg.h ../core/sessionmanager.h
rebus.o: ../core/sessioncontainer.h ../core/system.h
stat.o: templates.h ../../ezc/src/ezc.h ../../ezc/src/utf8.h
stat.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
@ -264,11 +262,11 @@ stat.o: ckeditorgetparser.h ../core/httpsimpleparser.h ../core/log.h
stat.o: ../core/textstream.h indexpatterns.h ../core/config.h
stat.o: ../core/confparser.h ../core/htmlfilter.h ../db/db.h ../db/dbbase.h
stat.o: ../db/dbconn.h ../db/dbtextstream.h ../core/error.h ../core/log.h
stat.o: ../db/dbitemquery.h ../core/item.h ../db/dbitemcolumns.h
stat.o: ../core/group.h ../core/thread.h ../core/dircontainer.h
stat.o: ../core/ugcontainer.h ../core/request.h ../core/requesttypes.h
stat.o: ../core/session.h ../core/error.h ../core/user.h ../core/plugindata.h
stat.o: ../core/rebus.h ../core/config.h ../core/system.h ../core/dirs.h
stat.o: ../db/dbitemquery.h ../db/dbitemcolumns.h ../core/group.h
stat.o: ../core/thread.h ../core/dircontainer.h ../core/ugcontainer.h
stat.o: ../core/request.h ../core/requesttypes.h ../core/session.h
stat.o: ../core/error.h ../core/user.h ../core/plugindata.h ../core/rebus.h
stat.o: ../core/config.h ../core/system.h ../core/dirs.h
stat.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h
stat.o: ../core/mount.h ../core/mountparser.h ../core/users.h
stat.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h
@ -284,7 +282,7 @@ sys.o: ../core/httpsimpleparser.h ../core/log.h ../core/textstream.h
sys.o: indexpatterns.h ../core/config.h ../core/confparser.h
sys.o: ../core/htmlfilter.h ../db/db.h ../db/dbbase.h ../db/dbconn.h
sys.o: ../db/dbtextstream.h ../core/error.h ../core/log.h ../db/dbitemquery.h
sys.o: ../core/item.h ../db/dbitemcolumns.h ../core/group.h ../core/thread.h
sys.o: ../db/dbitemcolumns.h ../core/group.h ../core/thread.h
sys.o: ../core/dircontainer.h ../core/ugcontainer.h ../core/request.h
sys.o: ../core/requesttypes.h ../core/session.h ../core/error.h
sys.o: ../core/user.h ../core/plugindata.h ../core/rebus.h ../core/config.h
@ -304,7 +302,7 @@ template.o: ckeditorgetparser.h ../core/httpsimpleparser.h ../core/log.h
template.o: ../core/textstream.h indexpatterns.h ../core/config.h
template.o: ../core/confparser.h ../core/htmlfilter.h ../db/db.h
template.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h
template.o: ../core/error.h ../core/log.h ../db/dbitemquery.h ../core/item.h
template.o: ../core/error.h ../core/log.h ../db/dbitemquery.h
template.o: ../db/dbitemcolumns.h ../core/group.h ../core/thread.h
template.o: ../core/dircontainer.h ../core/ugcontainer.h ../core/request.h
template.o: ../core/requesttypes.h ../core/session.h ../core/error.h
@ -325,7 +323,7 @@ templates.o: ckeditorgetparser.h ../core/httpsimpleparser.h ../core/log.h
templates.o: ../core/textstream.h indexpatterns.h ../core/config.h
templates.o: ../core/confparser.h ../core/htmlfilter.h ../db/db.h
templates.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h
templates.o: ../core/error.h ../core/log.h ../db/dbitemquery.h ../core/item.h
templates.o: ../core/error.h ../core/log.h ../db/dbitemquery.h
templates.o: ../db/dbitemcolumns.h ../core/group.h ../core/thread.h
templates.o: ../core/dircontainer.h ../core/ugcontainer.h ../core/request.h
templates.o: ../core/requesttypes.h ../core/session.h ../core/error.h
@ -364,16 +362,15 @@ thread.o: ckeditorgetparser.h ../core/httpsimpleparser.h ../core/log.h
thread.o: ../core/textstream.h indexpatterns.h ../core/config.h
thread.o: ../core/confparser.h ../core/htmlfilter.h ../db/db.h ../db/dbbase.h
thread.o: ../db/dbconn.h ../db/dbtextstream.h ../core/error.h ../core/log.h
thread.o: ../db/dbitemquery.h ../core/item.h ../db/dbitemcolumns.h
thread.o: ../core/group.h ../core/thread.h ../core/dircontainer.h
thread.o: ../core/ugcontainer.h ../core/request.h ../core/requesttypes.h
thread.o: ../core/session.h ../core/error.h ../core/user.h
thread.o: ../core/plugindata.h ../core/rebus.h ../core/config.h
thread.o: ../core/system.h ../core/dirs.h ../core/dircontainer.h
thread.o: ../core/request.h ../core/mounts.h ../core/mount.h
thread.o: ../core/mountparser.h ../core/users.h ../core/ugcontainer.h
thread.o: ../core/lastcontainer.h ../core/groups.h ../core/group.h
thread.o: ../core/loadavg.h ../core/sessionmanager.h
thread.o: ../db/dbitemquery.h ../db/dbitemcolumns.h ../core/group.h
thread.o: ../core/thread.h ../core/dircontainer.h ../core/ugcontainer.h
thread.o: ../core/request.h ../core/requesttypes.h ../core/session.h
thread.o: ../core/error.h ../core/user.h ../core/plugindata.h ../core/rebus.h
thread.o: ../core/config.h ../core/system.h ../core/dirs.h
thread.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h
thread.o: ../core/mount.h ../core/mountparser.h ../core/users.h
thread.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h
thread.o: ../core/group.h ../core/loadavg.h ../core/sessionmanager.h
thread.o: ../core/sessioncontainer.h ../core/system.h ../core/misc.h
thread.o: ../functions/functions.h ../functions/functionbase.h
thread.o: ../core/notify.h ../templatesnotify/templatesnotify.h
@ -401,16 +398,15 @@ upload.o: ckeditorgetparser.h ../core/httpsimpleparser.h ../core/log.h
upload.o: ../core/textstream.h indexpatterns.h ../core/config.h
upload.o: ../core/confparser.h ../core/htmlfilter.h ../db/db.h ../db/dbbase.h
upload.o: ../db/dbconn.h ../db/dbtextstream.h ../core/error.h ../core/log.h
upload.o: ../db/dbitemquery.h ../core/item.h ../db/dbitemcolumns.h
upload.o: ../core/group.h ../core/thread.h ../core/dircontainer.h
upload.o: ../core/ugcontainer.h ../core/request.h ../core/requesttypes.h
upload.o: ../core/session.h ../core/error.h ../core/user.h
upload.o: ../core/plugindata.h ../core/rebus.h ../core/config.h
upload.o: ../core/system.h ../core/dirs.h ../core/dircontainer.h
upload.o: ../core/request.h ../core/mounts.h ../core/mount.h
upload.o: ../core/mountparser.h ../core/users.h ../core/ugcontainer.h
upload.o: ../core/lastcontainer.h ../core/groups.h ../core/group.h
upload.o: ../core/loadavg.h ../core/sessionmanager.h
upload.o: ../db/dbitemquery.h ../db/dbitemcolumns.h ../core/group.h
upload.o: ../core/thread.h ../core/dircontainer.h ../core/ugcontainer.h
upload.o: ../core/request.h ../core/requesttypes.h ../core/session.h
upload.o: ../core/error.h ../core/user.h ../core/plugindata.h ../core/rebus.h
upload.o: ../core/config.h ../core/system.h ../core/dirs.h
upload.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h
upload.o: ../core/mount.h ../core/mountparser.h ../core/users.h
upload.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h
upload.o: ../core/group.h ../core/loadavg.h ../core/sessionmanager.h
upload.o: ../core/sessioncontainer.h ../core/system.h ../core/request.h
uptime.o: templates.h ../../ezc/src/ezc.h ../../ezc/src/utf8.h
uptime.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
@ -422,16 +418,15 @@ uptime.o: ckeditorgetparser.h ../core/httpsimpleparser.h ../core/log.h
uptime.o: ../core/textstream.h indexpatterns.h ../core/config.h
uptime.o: ../core/confparser.h ../core/htmlfilter.h ../db/db.h ../db/dbbase.h
uptime.o: ../db/dbconn.h ../db/dbtextstream.h ../core/error.h ../core/log.h
uptime.o: ../db/dbitemquery.h ../core/item.h ../db/dbitemcolumns.h
uptime.o: ../core/group.h ../core/thread.h ../core/dircontainer.h
uptime.o: ../core/ugcontainer.h ../core/request.h ../core/requesttypes.h
uptime.o: ../core/session.h ../core/error.h ../core/user.h
uptime.o: ../core/plugindata.h ../core/rebus.h ../core/config.h
uptime.o: ../core/system.h ../core/dirs.h ../core/dircontainer.h
uptime.o: ../core/request.h ../core/mounts.h ../core/mount.h
uptime.o: ../core/mountparser.h ../core/users.h ../core/ugcontainer.h
uptime.o: ../core/lastcontainer.h ../core/groups.h ../core/group.h
uptime.o: ../core/loadavg.h ../core/sessionmanager.h
uptime.o: ../db/dbitemquery.h ../db/dbitemcolumns.h ../core/group.h
uptime.o: ../core/thread.h ../core/dircontainer.h ../core/ugcontainer.h
uptime.o: ../core/request.h ../core/requesttypes.h ../core/session.h
uptime.o: ../core/error.h ../core/user.h ../core/plugindata.h ../core/rebus.h
uptime.o: ../core/config.h ../core/system.h ../core/dirs.h
uptime.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h
uptime.o: ../core/mount.h ../core/mountparser.h ../core/users.h
uptime.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h
uptime.o: ../core/group.h ../core/loadavg.h ../core/sessionmanager.h
uptime.o: ../core/sessioncontainer.h ../core/system.h
user.o: templates.h ../../ezc/src/ezc.h ../../ezc/src/utf8.h
user.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
@ -443,11 +438,11 @@ user.o: ckeditorgetparser.h ../core/httpsimpleparser.h ../core/log.h
user.o: ../core/textstream.h indexpatterns.h ../core/config.h
user.o: ../core/confparser.h ../core/htmlfilter.h ../db/db.h ../db/dbbase.h
user.o: ../db/dbconn.h ../db/dbtextstream.h ../core/error.h ../core/log.h
user.o: ../db/dbitemquery.h ../core/item.h ../db/dbitemcolumns.h
user.o: ../core/group.h ../core/thread.h ../core/dircontainer.h
user.o: ../core/ugcontainer.h ../core/request.h ../core/requesttypes.h
user.o: ../core/session.h ../core/error.h ../core/user.h ../core/plugindata.h
user.o: ../core/rebus.h ../core/config.h ../core/system.h ../core/dirs.h
user.o: ../db/dbitemquery.h ../db/dbitemcolumns.h ../core/group.h
user.o: ../core/thread.h ../core/dircontainer.h ../core/ugcontainer.h
user.o: ../core/request.h ../core/requesttypes.h ../core/session.h
user.o: ../core/error.h ../core/user.h ../core/plugindata.h ../core/rebus.h
user.o: ../core/config.h ../core/system.h ../core/dirs.h
user.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h
user.o: ../core/mount.h ../core/mountparser.h ../core/users.h
user.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h
@ -464,7 +459,7 @@ who.o: ../core/httpsimpleparser.h ../core/log.h ../core/textstream.h
who.o: indexpatterns.h ../core/config.h ../core/confparser.h
who.o: ../core/htmlfilter.h ../db/db.h ../db/dbbase.h ../db/dbconn.h
who.o: ../db/dbtextstream.h ../core/error.h ../core/log.h ../db/dbitemquery.h
who.o: ../core/item.h ../db/dbitemcolumns.h ../core/group.h ../core/thread.h
who.o: ../db/dbitemcolumns.h ../core/group.h ../core/thread.h
who.o: ../core/dircontainer.h ../core/ugcontainer.h ../core/request.h
who.o: ../core/requesttypes.h ../core/session.h ../core/error.h
who.o: ../core/user.h ../core/plugindata.h ../core/rebus.h ../core/config.h
@ -484,16 +479,15 @@ winix.o: ckeditorgetparser.h ../core/httpsimpleparser.h ../core/log.h
winix.o: ../core/textstream.h indexpatterns.h ../core/config.h
winix.o: ../core/confparser.h ../core/htmlfilter.h ../db/db.h ../db/dbbase.h
winix.o: ../db/dbconn.h ../db/dbtextstream.h ../core/error.h ../core/log.h
winix.o: ../db/dbitemquery.h ../core/item.h ../db/dbitemcolumns.h
winix.o: ../core/group.h ../core/thread.h ../core/dircontainer.h
winix.o: ../core/ugcontainer.h ../core/request.h ../core/requesttypes.h
winix.o: ../core/session.h ../core/error.h ../core/user.h
winix.o: ../core/plugindata.h ../core/rebus.h ../core/config.h
winix.o: ../core/system.h ../core/dirs.h ../core/dircontainer.h
winix.o: ../core/request.h ../core/mounts.h ../core/mount.h
winix.o: ../core/mountparser.h ../core/users.h ../core/ugcontainer.h
winix.o: ../core/lastcontainer.h ../core/groups.h ../core/group.h
winix.o: ../core/loadavg.h ../core/sessionmanager.h
winix.o: ../db/dbitemquery.h ../db/dbitemcolumns.h ../core/group.h
winix.o: ../core/thread.h ../core/dircontainer.h ../core/ugcontainer.h
winix.o: ../core/request.h ../core/requesttypes.h ../core/session.h
winix.o: ../core/error.h ../core/user.h ../core/plugindata.h ../core/rebus.h
winix.o: ../core/config.h ../core/system.h ../core/dirs.h
winix.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h
winix.o: ../core/mount.h ../core/mountparser.h ../core/users.h
winix.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h
winix.o: ../core/group.h ../core/loadavg.h ../core/sessionmanager.h
winix.o: ../core/sessioncontainer.h ../core/system.h ../core/plugin.h
winix.o: ../core/pluginmsg.h ../core/sessionmanager.h
winix.o: ../functions/functions.h ../functions/functionbase.h

View File

@ -13,7 +13,7 @@
#include <vector>
#include <map>
#include "../core/item.h"
#include "core/item.h"
#include "ezc.h"

View File

@ -425,6 +425,7 @@ void Templates::CreateFunctions()
plugin.Call(WINIX_TEMPLATES_CREATEFUNCTIONS, &ezc_functions);
log << log3 << "Templates: there are " << ezc_functions.Size() << " ezc functions" << logend;
}

View File

@ -45,7 +45,7 @@ void who_tab(Info & i)
++who_iterator;
++who_lp;
}
i.res = who_iterator != session_manager->SessionEnd();
}
@ -64,6 +64,7 @@ void who_tab_user(Info & i)
if( !who_init() )
return;
if( who_iterator->puser )
i.out << who_iterator->puser->name;
}