cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker mailing list Archives

[ curl-Bugs-1891355 ] Progress callback not called during failed socket connect

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Mon, 11 Feb 2008 12:18:42 -0800

Bugs item #1891355, was opened at 2008-02-11 19:34
Message generated for change (Comment added) made by bagder
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1891355&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: debug/info output
Group: wrong behaviour
Status: Open
Resolution: None
>Priority: 3
Private: No
Submitted By: Patrick_ (patrick_)
Assigned to: Daniel Stenberg (bagder)
Summary: Progress callback not called during failed socket connect

Initial Comment:
When attempting to connect to my FTP server, giving libcurl the wrong port (i.e port 219 instead of 21), the progress function is not called during the connection attempt. This is with curl 7.18.0.

Problem appears to be in lib/connect.c, in Curl_connecthost() and/or singleipconnect(). I have absolutely no experience with networking functions except using libcurl, but I added a pgrsUpdate() call in Curl_connecthost() after the singleipconnect() function is called. This has the progress callback called, but only after the blocking singleipconnect() function returns.

I'll keep trial-and-erroring to see if I can fix this, but quickly looking at the singleipconnect() function and it's blocking standard library calls, I'm not even sure there's a possible fix for this.

----------------------------------------------------------------------

>Comment By: Daniel Stenberg (bagder)
Date: 2008-02-11 21:18

Message:
Logged In: YES
user_id=1110
Originator: NO

First, the progress callback is generally rather pointless for the multi
interface since then you can get all this info already by yourself and you
can do all sorts of things between the invokes of curl_multi_* etc.

Then, libcurl is using non-blocking sockets so the only really blocking
thing in a connect that you may see is the name resolving, and that's
non-blocking if you built with c-ares or on Windows.

Doesn't it make sense to add a call to pgrsUpdate() in the
lib/connect.c:Curl_is_connected() function ?

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1891355&group_id=976
Received on 2008-02-11

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET