summaryrefslogtreecommitdiff
path: root/src/Main.cc
diff options
context:
space:
mode:
authorPixel <Pixel>2001-11-15 14:52:43 +0000
committerPixel <Pixel>2001-11-15 14:52:43 +0000
commit3f720784d55707024fff675a5238fde0168d1a40 (patch)
tree84a5b9843ede69aaf76cd9b791686b2a3ea7c3d7 /src/Main.cc
parent8694409f2a5531e9f3263e8a42248a3ca91ac14f (diff)
More work into TaskMan...
Diffstat (limited to 'src/Main.cc')
-rw-r--r--src/Main.cc11
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;