Re: Misc fixes

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Mon, 24 Aug 1998 21:46:50 +0200

Stephen R. van den Berg wrote:

> aio_do_close(aio_request_t * requestp)
...
> + debug(43, 0) ("aio_do_close: FD %d, errno %d\n", requestp->fd, errno);

Hmm.. is it wise to have debug calls inside a thread? Is stdio to the
same FILE and syslog MT-safe on all platforms? I would not bet on it..

> - else if (!strcmp(token, "override-expire"))
> + else if (!strcmp(token, "override-lastmod"))

My fault.. copy&paste is a bit to quick sometimes ;-)

> ********************************************************
> An extension to allow the redirector to act differently
> depending on the port the request was made on
> (for junk-buster and non-junk-buster decisions).
> ********************************************************

Why not generalize and always send local IP+PORT? I can image
a number of situations when this can be handy, not limited
to this specific case. Or perhaps associate each http_port with
a configurable tag to simplify the redirectors job & configuration.

Hmm.. thinking about http_port a bit more. Maybe we should
generalize http_port + tcp_incoming_address + redirect tag
to one config option?

I guess the same applies to icp_port and udp_incoming_address,
and we should add a new directive for outgoing icp port, in
case someone may want to differentiate between the two..

> --- squid-1.2.beta24/src/filemap.c Wed Jul 22 22:37:19 1998
> +++ squid-BuGless/src/filemap.c Thu Jul 23 17:54:28 1998
...
> - word = (word + 1) % fm->nwords;
> + if (++word == fm->nwords)
> + word = 0;

I would use >= here. Not that is matters unless something unexplainable
happens..

> ********************************************************
> Self explanatory?
> ********************************************************
>
> diff -u -b -r squid-1.2.beta24/src/forward.c squid-BuGless/src/forward.c
> --- squid-1.2.beta24/src/forward.c Wed Aug 19 08:05:52 1998
> +++ squid-BuGless/src/forward.c Sat Aug 22 04:37:41 1998

> +#if 0 /* SRB bogus assertion? */
> assert(fwdState->fail.err_code);
> +#endif

Is it?

We should not get there unless a error was detected and registered. If
it isn't then there is a bug somewhere else.

> ********************************************************
> Missing argument; why I am the only one seeing this
> problem?
> ********************************************************

You are not. Problem is that Duane does not use async-io..

same error on storeValidateComplete.

The prototypes should be replaced by AIOCB definitions to avoid similar
errors next time someone changes the interface (if it is changed).

I sent a patch to squid-bugs yesterday for this the q == data problem.

A recommendation: Always compile your Squid using -Wall -Werror. It
forces you to deal with warnins like this the first time it is seen by
the compiler (we can't have -Werror in the release, as some platforms
have broken headers...).

/Henrik
Received on Tue Jul 29 2003 - 13:15:52 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:11:52 MST