From 97f9cb5573f03fa25786b9213a740e875d3b771a Mon Sep 17 00:00:00 2001 From: Pixel Date: Thu, 23 Oct 2008 17:07:48 -0700 Subject: Auto-destroying the mail processor objects upon completion. --- lib/MailServer.cc | 13 +++++++++++-- 1 file 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; -- cgit v1.2.3