Author: Todd Lyons Date: To: Jeremy Harris CC: exim-dev Subject: Re: [exim-dev] Refactor optional MAIL args processing
On Fri, Mar 23, 2012 at 8:59 AM, Todd Lyons <tlyons@???> wrote: >>> Quoting Jeremy Harris:
>>> I'd like a code refactor from the if/elseif chain into a table-driven
>>> approach, using a static data table of acceptable option names
>
> I used the method and techniques your patch implemented to refactor
> the if else chain for MAIL smtp command option processing inside the
> for() loop into a switch() construction. It passes all my manual
> tests (interesting that swaks doesn't have any option that passes
> optional args to the MAIL FROM) on my test system. I'll roll it live
> next week and watch for issues (waiting until after the weekend). If
> it works ok for a week and I can verify that it's actually being
> exercised, then I'll submit it to the exim team.
So far it's working well. The attached patch is based on the
exim-4_77 tag, but it applies to master cleanly. It has a couple of
trailing whitespaces, just add '--whitespace=fix' to the git am
command. Can anybody look at the attached patch and tell me:
1) Is it conforming to exim standards?
2) Does it result in sane looking code?
3) Are there any glaring errors?
Comments and feedback are welcome.
...Todd
--
Always code as if the guy who ends up maintaining your code will be a
violent psychopath who knows where you live. -- Martin Golding