- From: Kallweit, Heiner <Heiner.Kallweit@commerzbank.com>
- Date: Thu, 27 Jul 2000 16:36:35 +0200
- To: "'jose.kahan@w3.org'" <jose.kahan@w3.org>
- Cc: "'www-lib@w3.org'" <www-lib@w3.org>
I did some further tests and added a new flag "BOOL in_flush" to the HTHost
structure.
It is initialized in HTHost_new:
pres->ntime = time(NULL);
pres->mode = HT_TP_SINGLE;
pres->delay = WriteDelay;
pres->in_flush=NO;
{
int i;
Now HTHost_forceFlush looks like this:
PUBLIC int HTHost_forceFlush(HTHost * host)
{
HTNet * targetNet = (HTNet *) HTList_lastObject(host->pipeline);
int ret;
if (host->in_flush || targetNet == NULL) return HT_ERROR;
HTTRACE(CORE_TRACE, "Host Event.. FLUSH passed to `%s\'\n" _
HTAnchor_physical(HTRequest_anchor(HTNet_request(targetNet))));
host->forceWriteFlush = host->in_flush = YES;
while ((ret=(*targetNet->event.cbf)(HTChannel_socket(host->channel),
targetNet->event.param,
HTEvent_FLUSH))==HT_WOULD_BLOCK);
host->forceWriteFlush = host->in_flush = NO;
return ret;
}
So the flushes to different hosts are independant. It works for me. Comments
?
Regards, Heiner
> -----Ursprüngliche Nachricht-----
> Von: Kallweit, Heiner
> Gesendet am: Mittwoch, 26. Juli 2000 17:46
> An: 'jose.kahan@w3.org'
> Cc: 'www-lib@w3.org'
> Betreff: RE: Solution for possible crash if using SSL
>
> 1. You're right, it blocks every flush. It was a quick fix for me
> and in my app there is always only one host. So it may not be a
> solution for everybody.
> 2. To use the forceWriteFlush-flag is IMHO no good idea, because
> this flag is set also at other places in HTHost.c and we had
> no chance to reset the flag. So we have to add a new flag to
> the HTHost structure ?
>
> Regards, Heiner
>
> > -----Ursprüngliche Nachricht-----
> > Von: jose.kahan@w3.org [mailto:jose.kahan@w3.org]
> > Gesendet am: Mittwoch, 26. Juli 2000 17:21
> > An: Kallweit, Heiner
> > Cc: 'www-lib@w3.org'
> > Betreff: Re: Solution for possible crash if using SSL
> >
> > Hello Heiner,
> >
> > I saw your patch. One thing that worries me is that your
> patch blocks
> > all flushes that may be done in any host. Did you try to use the
> > host->forceWriteFlush variable instead, to do the same thing?
> >
> > That is
> >
> > if (host->force_writeFlush || targetNet == NULL)
> >
> > instead of
> >
> > if (in_flush || targetNet == NULL)
> >
> > It looks like a better solution to me. Could you give it a
> > try and then
> > report back to the list?
> >
> > Thanks!
> >
> > -Jose
>
Received on Thursday, 27 July 2000 10:37:24 UTC