W3C home > Mailing lists > Public > www-lib@w3.org > January to March 2000

Re: Timeout bug in HTEvtLoop

From: cathy <paige8978@excite.com>
Date: Mon, 21 Feb 2000 17:02:53 -0800 (PST)
Message-ID: <25624186.951181373915.JavaMail.imail@scorch.excite.com>
To: Sam Couter <sam@topic.com.au>, Mike Flynn <flynn5@home.com>, Mike Flynn <flynn5@home.com>, www-lib@w3.org
Cc: www-lib@w3.org
i think i got this email in accident.  cause i don't know who you are.

On Tue, 22 Feb 2000 11:21:24 +1100, Sam Couter wrote:

>  Mike Flynn <flynn5@home.com> wrote:
>  > As in all cases, either I've goofed up the example or I've uncovered a
>  > bug.
>  I'm having the same problem as you. I found what I believe is the cause,
>  I call it a bug. Others don't seem to agree. :/
>  > I put an event timeout using the HTHost_setEventTimeout( int )
>  > and I am able to catch the event in a cbf after the appropriate amount
>  > of time.   The problem occurs after the cbf as I want to break the
>  > loop and return control to another part of my program.   The terminate
>  > handler calls the appropriate functions (from what I've seen in the
>  > examples) but the code in the EventLoop (HTEvtLoop.c) doesn't do any
>  > checking of the main loop variable that I've turned off with a call to
>  > HTEventList_stopLoop().  I just goes on to read from a socket that will
>  > never return anything.  It doesn't seem to matter what I return from
>  > cbf...  All the example programs just do an exit().
>  Try adding these two lines to HTEvtLst.c, in function HTEventList_loop():
>      if (HTEndLoop)
>  	        break;
>  They go around line 671, right after these two lines:
>      if ((status = HTTimer_next(&timeout)))
>  	        break;
>  The HTTimer_next() call is calling your timeout function, which sets
>  HTEndLoop, but HTEndLoop is never chocked between the timer functions and
>  the select() call. Of course, select() will just wait forever if there
>  no file descriptors ready.
>  Please let me know if this fixes your problem. It fixed mine.
>  -- 
>  Sam Couter                                              sam@topic.com.au
>  Internet Engineer                               http://www.topic.com.au/
>  tSA Consulting
>  << File Attachment Removed: "application/pgp-signature" >>

words are powerful.

Get 100% FREE Internet Access powered by Excite
Visit http://freeworld.excite.com
Received on Monday, 21 February 2000 20:02:58 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:52 UTC