summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/LuaTask.cc38
1 files changed, 18 insertions, 20 deletions
diff --git a/lib/LuaTask.cc b/lib/LuaTask.cc
index a0fe0c3..2990e53 100644
--- a/lib/LuaTask.cc
+++ b/lib/LuaTask.cc
@@ -49,35 +49,33 @@ int LuaTask::Do() throw (GeneralException) {
} else {
L->resume(nargs);
}
- case 1:
case 2:
- if (current == 2) {
- int nargs = 0;
+ int nargs = 0;
#ifndef LUATASK_OMIT_HTTPCLIENT
- if (task == "HttpClient") {
- LuaBuffer o(b);
- o.pushdestruct(L);
- nargs = 1;
- }
+ if (task == "HttpClient") {
+ LuaBuffer o(b);
+ o.pushdestruct(L);
+ nargs = 1;
+ }
#endif
#ifndef LUATASK_OMIT_COMMAND
- if (task == "Command") {
- delete p;
- printm(M_INFO, "Got there (end of command - should)\n");
- LuaBuffer o(b);
- o.pushdestruct(L);
- nargs = 1;
- }
+ if (task == "Command") {
+ delete p;
+ printm(M_INFO, "Got there (end of command - should)\n");
+ LuaBuffer o(b);
+ o.pushdestruct(L);
+ nargs = 1;
+ }
#endif
- if (!c)
- delete c;
- c = 0;
+ if (!c)
+ delete c;
+ c = 0;
- L->resume(nargs);
- }
+ L->resume(nargs);
+ case 1:
current = 2;
if (L->gettop() >= 1) {
task = L->tostring(1);