Re: a general question

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Tue, 01 May 2001 14:08:38 +0200

Squid code questions should be send to squid-dev@squid-cache.org.

This block seems to be there to introduce additional local variables.
Unlike C++ C can only have variable declarations at the head of a block.

DIRECT is one of the servers added to the servers list if so is allowed
in peer selection (remember, DIRECT may have been forbidden in the
configuration by never_direct).

If the server list ends up empty then there was no possible paths to use
to forward the request (not even DIRECT).

--
Henrik Nordstrom
Squid Hacker
Songqing Chen wrote:
> 
> Hi, Henrik,
> two questions when I read the program.
> 1. in the cachemgrStart ,  the usage of { }  seems wired/unnecessary. Not sure if it is a
> careless mistake.
> 
> assert(a != NULL);
>     if (a->flags.atomic)
>         storeBuffer(entry);
>     {
>         HttpReply *rep = entry->mem_obj->reply;
>         /* prove there are no previous reply headers around */
>         assert(0 == rep->sline.status);
>         httpReplySetHeaders(rep,
>             (double) 1.0,
>             HTTP_OK,
>             NULL,
>             "text/plain",
>             -1,                 /* C-Len */
>             squid_curtime,      /* LMT */
>             squid_curtime);
>         httpReplySwapOut(rep, entry);
>     }
>     a->handler(entry);
> 
> 2. If the object is not cached in the proxy, and the request is directed to fetch it from
> original server.
> the last line in "peerSelectFoo" calls "peerSelectCallback(ps)" ,
> in which "fwdStartComplete" is called as the callback function, with the psstate->servers
> set to NULL.
> But in the fwdStartComplete, if the server is set to NULL,
> it will call the fwdStartFail.
> 
> I am not sure if my understanding is correct.
> 
> --
> 
> Songqing Chen
> Dept. of Computer Science
> College of William&Mary
Received on Tue May 01 2001 - 07:47:30 MDT

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