tlyons at ivenue
Mar 23, 2012, 8:59 AM
Post #1 of 1
On Mon, Mar 19, 2012 at 11:22 AM, Todd Lyons <tlyons [at] ivenue> wrote:
>>> 1) would it better to pass a variable to extract_option() to indicate
>>> that "=" is not required?
>> Given the limited number of callers I'd be happy with such a mod.
>> The problem is that it's still required for the current options,
>> and you've not determined what the option is yet.
>> 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
>> each with a "supplies argument" indicator. This would be in line
>> with (eg.) the parsing in acl_verify().
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.
Always code as if the guy who ends up maintaining your code will be a
violent psychopath who knows where you live. -- Martin Golding
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##