diff options
Diffstat (limited to 'src/Main.cc')
-rw-r--r-- | src/Main.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/Main.cc b/src/Main.cc index e712a95..9075f5d 100644 --- a/src/Main.cc +++ b/src/Main.cc @@ -3,6 +3,8 @@ #include <sys/types.h> #include <sys/wait.h> #include "Handle.h" +#include "Task.h" +#include "TaskMan.h" #include "HttpServ.h" #include "Socket.h" #include "config.h" @@ -30,7 +32,7 @@ class ad_t : public Action { ad_t() : Action("menu6") { } virtual ~ad_t() { } virtual String GetTitle() { return "Action dynamique"; } - virtual void Do(Variables * v, Handle * h) { + virtual Task * Do(Variables * v, Handle * h) { String ut, un; if (!fork()) { @@ -49,9 +51,10 @@ class ad_t : public Action { String("Vous avez choisi l'action dynamique. L'uptime de la machine est '") + ut + "' et sa définition complète est '" + un + "'", ""); - m->Do(v, h); + Task * t = m->Do(v, h); delete m; + return t; } }; Action * ad = new ad_t(); @@ -117,8 +120,8 @@ int main(int argc, char ** argv) { } try { - HttpServ h(port.to_int()); - h.MainLoop(buildmenu()); + HttpServ h(buildmenu(), port.to_int()); + TaskMan::MainLoop(); } catch (GeneralException e) { cerr << e.GetMsg() << endl; |