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';
-JohnMessage
Re: [milter-greylist] Sending ACL id string to syslog, instead of ACL line number
2009-04-17 by John Thiltges