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

HTEventList_loop on Windows

From: Shigeyuki Fukushima <shige@sitc.toshiba.co.jp>
Date: Fri, 15 Feb 2002 10:32:21 +0900
Message-ID: <863d03h6my.wl@aurora.sitc.toshiba.co.jp>
To: www-lib@w3.org
Cc: shige@sitc.toshiba.co.jp


Now I'm using w3c-libwww-5.3.2 on x86/Windows platform.
I have found a fatal bug(?) in HTEventList_loop function.

When compiling Library/src/HTEvtLst.c with WWW_WIN_ASYNC definition.
`HTHost_setEventTimeout(60000);' operation has no effect for
main event loop.
When a program sent a http request for an unreachable URL, 
it cannot escape main event loop parmanently, even if
HTHost_setEventTimeout() is called before in loop.

Then, I tried to modify HTEvtLst.c as follows (add):

PUBLIC int HTEventList_loop (HTRequest * theRequest)

    MSG msg;
    int status;
    ms_t timeout;
    while (!HTEndLoop && GetMessage(&msg,0,0,0)) {
            /* add FROM */
            if ((status = HTTimer_next(&timeout)))
            /* add TO */

    status = HTEndLoop;
    /* Reset HTEndLoop in case we want to start again */
    HTEndLoop = 0;
    return (status == 1 ? HT_OK : HT_ERROR);

#else /* WWW_WIN_ASYNC */

Is this modification correct?
Or, do you have a nice idea for this problem?


--- shige
Shigeyuki Fukushima 
Received on Thursday, 14 February 2002 20:32:28 UTC

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