Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Message

Re: [milter-greylist] Sending ACL id string to syslog, instead of ACL line number

2009-04-17 by John Thiltges

On 04/16/2009 11:34 PM, manu@... wrote:
> What tabout the performance impact of this change? Now we go to
> fstring_expand() regardless of the existance of an ACL id string, and
> that function at least performs two mallocs. Perhaps we should test for
> it before entering fstring_expand()

Would it be better to make aclstr[] a larger static buffer and not use 
fstring_expand()?

Example:

char aclstr[HDRLEN];

if (priv->priv_sr.sr_acl_id)
    snprintf(aclstr, sizeof(aclstr), " (ACL %s)",
        priv->priv_sr.sr_acl_id);
else if (priv->priv_sr.sr_acl_line != 0)
    snprintf(aclstr, sizeof(aclstr), " (ACL %d)",
        priv->priv_sr.sr_acl_line);
else
    aclstr[0] = '\0';

-John

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.