---------- Forwarded message ----------
Date: Fri, 11 Feb 2005 11:11:12 +1100
From: "Liapis, Sam (Melb, Aust)" <[EMAIL PROTECTED]>
To: 'Henrik Nordstrom' <[EMAIL PROTECTED]>
Subject: RE: Limited cache_dir entries?


Thanks for the speedy response and feedback Henrik.

Regards,
Sam Liapis.
(Melbourne, Australia)

-----Original Message-----
From: Henrik Nordstrom [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 09, 2005 7:48 PM
To: Liapis, Sam (Melb, Aust)
Cc: Squid Developers
Subject: Re: Limited cache_dir entries?


On Wed, 9 Feb 2005, Liapis, Sam (Melb, Aust) wrote:

Hence the comment appended to the line where the assert occured inside of
cache_cf.c:

1285  assert(swap->n_configured < 63);   /* 7 bits, signed */

I understand 7 bits signed provides a permissible range of +64 to -64.
That being the case this test could be altered to <= to permit the 64th
cache_dir to be accepted in the squid.conf parse. Would this seems the
case to you? (Note: swap->n_configured is incremented after this line).

a 7-bit unsigned allows for -64 to +63, but you are right the code should accept 64 cache_dirs (dir # 0 to 63 == 64 directories), not 63. The swap->n_configured is a full integer, it's only the SIO where the directory number is 7 bits.

In addition, if you need more it shouldn't be too hard to change swap_dirn
to be an unsigned variable, allowing for 127 cache_dirs. The only reason
why it's signed is to allow for -1 meaning "no cache dir" and there is
only two lines in the code looking for -1, both in swap.c.

Regards
Henrik

_____________________________________________________________________
This e-mail has been scanned for viruses by MessageLabs.
For further information contact - [EMAIL PROTECTED]

Reply via email to