diff options
author | Daniel Stenberg <daniel@haxx.se> | 2006-04-21 13:46:19 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2006-04-21 13:46:19 +0000 |
commit | db03d4bdd0aa5b2eaef8fb0987310fe5c0ff0570 (patch) | |
tree | 40464558f59ce91404718b5061cba70eb369e85e | |
parent | 0ec96e427987e157dfbee57c016c30b671f336f5 (diff) |
Ale Vesely fixed CURLOPT_INTERFACE when using a hostname
-rw-r--r-- | CHANGES | 7 | ||||
-rw-r--r-- | RELEASE-NOTES | 7 | ||||
-rw-r--r-- | lib/connect.c | 11 |
3 files changed, 21 insertions, 4 deletions
@@ -6,7 +6,14 @@ Changelog +Daniel (21 April 2006) +- Ale Vesely fixed CURLOPT_INTERFACE when using a hostname. + Daniel (19 April 2006) +- Based on previous info from Tor Arntsen, I made configure detect the Intel + ICC compiler to add a compiler option for it, in order for configure to + properly be able to detect function prototypes. + - Robson Braga Araujo provided a patch that makes libcurl less eager to close the control connection when using FTP, for example when you remove an easy handle from a multi stack. diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 7b2cedeea..cb352f53d 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -18,10 +18,12 @@ This release includes the following changes: This release includes the following bugfixes: + o CURLOPT_INTERFACE works with hostname + o configure runs fine with ICC o closed control connection with FTP when easy handle was removed from multi o curl --trace crash when built with VS2005 o SSL connect time-out - o Improved NTLM functionality + o improved NTLM functionality o following redirects with more than one question mark in source URL o fixed debug build crash with -d o TFTP works on more systems @@ -39,6 +41,7 @@ This release would not have looked like this without help, code, reports and advice from friends like these: Dan Fandrich, Ilja van Sprundel, David McCreedy, Tor Arntsen, Xavier Bouchoux, - David Byron, Michele Bini, Ates Goral, Katie Wang, Robson Braga Araujo + David Byron, Michele Bini, Ates Goral, Katie Wang, Robson Braga Araujo, + Ale Vesely Thanks! (and sorry if I forgot to mention someone) diff --git a/lib/connect.c b/lib/connect.c index f0865f47c..b3372f42a 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -100,6 +100,7 @@ #include "url.h" /* for Curl_safefree() */ #include "multiif.h" #include "sockaddr.h" /* required for Curl_sockaddr_storage */ +#include "inet_ntop.h" /* The last #include file should be: */ #include "memdebug.h" @@ -288,8 +289,14 @@ static CURLcode bindlocal(struct connectdata *conn, (void)Curl_wait_for_resolv(conn, &h); if(h) { - /* we know data->set.device is shorter than the myhost array */ - strcpy(myhost, data->set.device); + if(in == CURL_INADDR_NONE) + /* convert the resolved address, sizeof myhost >= INET_ADDRSTRLEN */ + Curl_inet_ntop(h->addr->ai_addr->sa_family, + &((struct sockaddr_in*)h->addr->ai_addr)->sin_addr, + myhost, sizeof myhost); + else + /* we know data->set.device is shorter than the myhost array */ + strcpy(myhost, data->set.device); Curl_resolv_unlock(data, h); } } |