Re: squid-2 acl fileext

From: Henrik Nordstrom <henrik@dont-contact.us>
Date: Wed, 01 Aug 2007 01:30:14 +0200

On tis, 2007-07-31 at 17:51 -0300, Lucas Brasilino wrote:
> Hi Henrik:
>
> Did you see my patch?

Kind of.. was on vacation and saw the message in my phone and made a
mental note to read it in full when home. Then lost in the noise..

> I've sent directly to you to not polute the mailing list with
> messy patches... :) :-P

Posting to the mailinglist is better. Less things gets lost there, and
others may be available to comment.

Anyway the problem is here:

+ k = aclMatchFileExt(&ae->data, esc_buf);

which sends a pointer to the pointer, but aclMatchFileExt expects a
pointer..

Either remove that &, or make aclMatchFileExt reference the pointer..

      wordlist **p = data;
      wordlist *l = *p;

The reason why dstdomain sends a pointer to the pointer is that it's
using a splay tree, and the splay trees are self-organising rewriting
themselves to optimize matches..

So when to send a pointer to the pointer to the match function depends
on the implementation of the match function. Most just wants a plain
pointer, only the splay based lookups wants a pointer to the pointer..

Regards
Henrik

Received on Tue Jul 31 2007 - 17:30:25 MDT

This archive was generated by hypermail pre-2.1.9 : Wed Aug 01 2007 - 12:00:06 MDT