summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2008-10-23 17:07:48 -0700
committerPixel <pixel@nobis-crew.org>2008-10-23 17:07:48 -0700
commit97f9cb5573f03fa25786b9213a740e875d3b771a (patch)
tree4b77865c8941b67c1d69ed3d208c53a2b4de4d6a
parente2696aa19728e013300f78aa53efe7ab5fdc9a27 (diff)
Auto-destroying the mail processor objects upon completion.
-rw-r--r--lib/MailServer.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/MailServer.cc b/lib/MailServer.cc
index c0e3607..2c394cc 100644
--- a/lib/MailServer.cc
+++ b/lib/MailServer.cc
@@ -158,8 +158,17 @@ int ProcessSMTPRequest::Do() throw (GeneralException) {
}
}
- /***TODO*** Wait for the task and destroy it. */
- Task * r = MailHandler::ProcessMail(out, from, tos);
+ c = MailHandler::ProcessMail(out, from, tos);
+
+ if (c) {
+ current = 6;
+ WaitFor(c);
+ Suspend(TASK_ON_HOLD);
+ }
+ case 6:
+
+ if (c)
+ delete c;
delete out;