Bugs item #3392945, was opened at 2011-08-17 18:27
Message generated for change (Tracker Item Submitted) made by awlike
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3392945&group_id=976
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: libcurl
Group: hang
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: qzy (awlike)
Assigned to: Daniel Stenberg (bagder)
Summary: curl_easy_perform hanged
Initial Comment:
I'm using libcurl 7.21.7 under Symbian S60 V5 with emulator. After building the library, i test the code from example 'httpcustomheader.c' and it hanged at curl_easy_perform.
I debugged it and found the problem is function Curl_socket_ready in file 'select.c'. The app executed the following code:
do {
if(timeout_ms > 0) {
pending_tv.tv_sec = pending_ms / 1000;
pending_tv.tv_usec = (pending_ms % 1000) * 1000;
}
else if(!timeout_ms) {
pending_tv.tv_sec = 0;
pending_tv.tv_usec = 0;
}
r = select((int)maxfd + 1, &fds_read, &fds_write, &fds_err, ptimeout);
if(r != -1)
break;
error = SOCKERRNO;
if(error && error_not_EINTR)
break;
if(timeout_ms > 0) {
pending_ms = timeout_ms - elapsed_ms;
if(pending_ms <= 0)
break;
}
} while(r == -1);
Unfortunately, the app run into a dead loop. Variable timeout_ms is 0 and function select() returnd -1.
Later i tested example 'htmltitle.c', it has the same problem.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3392945&group_id=976
Received on 2011-08-17