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, 03 Mar 2008 19:20:12 -0800

Bugs item #1891355, was opened at 2008-02-11 10:34
Message generated for change (Comment added) made by sf-robot
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: Closed
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: SourceForge Robot (sf-robot)
Date: 2008-03-03 19:20

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

This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).

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

Comment By: Daniel Stenberg (bagder)
Date: 2008-02-11 12: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-03-04

These mail archives are generated by hypermail.

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

File upload with ASP.NET