diff options
author | Daniel Stenberg <daniel@haxx.se> | 2005-09-02 15:11:08 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2005-09-02 15:11:08 +0000 |
commit | 56d9624b566ac15ffb4b4b6eef220a5000b767e0 (patch) | |
tree | 9511f37ced87ba79fe96416b21e41fadffe17224 /lib/connect.c | |
parent | 911d135deb619f6d18ae3e0150c3808be54831a3 (diff) |
John Kelly added TFTP support to libcurl. A bunch of new error codes was
added. TODO: add them to docs. add TFTP server to test suite. add TFTP to
list of protocols whereever those are mentioned.
Diffstat (limited to 'lib/connect.c')
-rw-r--r-- | lib/connect.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/connect.c b/lib/connect.c index 50f6684b6..5d9cf65ef 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -660,8 +660,13 @@ singleipconnect(struct connectdata *conn, /* set socket non-blocking */ Curl_nonblock(sockfd, TRUE); - rc = connect(sockfd, ai->ai_addr, (socklen_t)ai->ai_addrlen); - + /* Connect TCP sockets, bind UDP */ + if(ai->ai_socktype==SOCK_STREAM) { + rc = connect(sockfd, ai->ai_addr, (socklen_t)ai->ai_addrlen); + } else { + rc = 0; + } + if(-1 == rc) { error = Curl_ourerrno(); |