diff options
author | Pixel <pixel@nobis-crew.org> | 2008-10-23 17:07:48 -0700 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2008-10-23 17:07:48 -0700 |
commit | 97f9cb5573f03fa25786b9213a740e875d3b771a (patch) | |
tree | 4b77865c8941b67c1d69ed3d208c53a2b4de4d6a /lib | |
parent | e2696aa19728e013300f78aa53efe7ab5fdc9a27 (diff) |
Auto-destroying the mail processor objects upon completion.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/MailServer.cc | 13 |
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; |