Re: [bmd@mp3.com: Re: doublecheck patches .]

From: Duane Wessels <wessels@dont-contact.us>
Date: Mon, 13 Nov 2000 15:52:24 -0700 (MST)

On Mon, 13 Nov 2000, Adrian Chadd wrote:

>
> Here are a new set of patches which I remember being posted to squid-dev
> a couple of months back, but nothing happened.

> static void
> parse_peer(peer ** head)
> {
> char *token = NULL;
> peer *p;
> int i;
> sockaddr_in_list *s;
> - const char *me = null_string; /* XXX */
> + const char *me = getMyHostname();
> p = memAllocate(MEM_PEER);
> p->http_port = CACHE_HTTP_PORT;
> p->icp.port = CACHE_ICP_PORT;
> p->weight = 1;
> p->stats.logged_state = PEER_ALIVE;
> if ((token = strtok(NULL, w_space)) == NULL)
> self_destruct();

The commit log for this change says

    char *me = getMyHostname() breaks strtok on irix-6?

Not very informative. Maybe getMyHostname() used strtok() in the past
and that trashed the later call in parse_peer().

It would be good if someone has access to an IRIX-6.x box and
could verify that the above change no longer breaks the
strtok call later.
Received on Mon Nov 13 2000 - 15:52:25 MST

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