- From: Sam Couter <eddie@topic.com.au>
- Date: Thu, 9 Dec 1999 17:10:38 +1100
- To: www-lib@w3.org
I posted a message to the list a few weeks ago about libwww stalling when
attempting to retrieve pages that require a password, when I have no
password to give.
I have done some further investigation, and so far I've come up with this
gem:
In HTEvtLst.c, I suspect this code chunk is causing the problem (line 665):
if ((status = HTTimer_next(&timeout)))
break;
The call to HTTimer_next() dispatches events that (eventually) call my
terminate_request() callback function. I dutifully terminate and delete the
request, determine that it's the last request I'm interested in, and call
HTEventList_stopLoop(). However, the next thing in HTEventList_loop() is
setting up and executing the call to select(). Of course, having just
deleted the last request, no more requests are going to become active.
I don't understand much about the low-level architecture of the library or
the event loop.
Can anyone help me out at all?
Questions for those with more knowledge than I:
1) Why is select() called when no (active?) requests exist?
2) Can I use HTNet_isIdle() to determine whether select() should be called
at all?
3) (somewhat related) Should HTNet_setRequest() honour the desire to set the
request object for a particular net object to NULL? (currently it will
just return NO if you call HTNet_setRequest(net, NULL))
4) Should HTNet_setRequest() decrease the Active count if the request object
is set to NULL?
Am I missing anything?
--
Sam Couter sam@topic.com.au
Internet Engineer
tSA Consulting
Received on Thursday, 9 December 1999 01:11:11 UTC