summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2006-02-16 10:02:11 +0000
committerDaniel Stenberg <daniel@haxx.se>2006-02-16 10:02:11 +0000
commitad6511c313a06a62421e1b426974cf8b5e85f466 (patch)
tree583f81110979a0c4817d3d17d8272c91c6dc6130 /lib
parent7a37fa4aef391c42a9c59f2c0643661319e6cd74 (diff)
downloadcurl-ad6511c313a06a62421e1b426974cf8b5e85f466.tar.gz
Added some clarifying comments
Diffstat (limited to 'lib')
-rw-r--r--lib/url.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/url.c b/lib/url.c
index 49e7c1cbf..fe0dc3c25 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -2296,7 +2296,8 @@ static void fix_hostname(struct connectdata *conn, struct hostname *host)
*
* @param data The sessionhandle pointer
* @param in_connect is set to the next connection data pointer
- * @param addr is set to the new dns entry for this connection
+ * @param addr is set to the new dns entry for this connection. If this
+ * connection is re-used it will be NULL.
* @param async is set TRUE/FALSE depending on the nature of this lookup
* @return CURLcode
* @see SetupConnection()
@@ -3630,8 +3631,11 @@ static CURLcode CreateConnection(struct SessionHandle *data,
return result;
}
-/* SetupConnection() should be called after the name resolve initiated in
+/* SetupConnection() is called after the name resolve initiated in
* CreateConnection() is all done.
+ *
+ * NOTE: the argument 'hostaddr' is NULL when this function is called for a
+ * re-used connection.
*/
static CURLcode SetupConnection(struct connectdata *conn,
@@ -3730,8 +3734,8 @@ CURLcode Curl_connect(struct SessionHandle *data,
/* no error */
if(dns || !*asyncp)
/* If an address is available it means that we already have the name
- resolved, OR it isn't async.
- If so => continue connecting from here */
+ resolved, OR it isn't async. if this is a re-used connection 'dns'
+ will be NULL here. Continue connecting from here */
code = SetupConnection(*in_connect, dns, protocol_done);
/* else
response will be received and treated async wise */