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/hostip4.c | |
parent | 911d135deb619f6d18ae3e0150c3808be54831a3 (diff) | |
download | curl-56d9624b566ac15ffb4b4b6eef220a5000b767e0.tar.gz |
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/hostip4.c')
-rw-r--r-- | lib/hostip4.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/hostip4.c b/lib/hostip4.c index 1244a47bf..d9277b960 100644 --- a/lib/hostip4.c +++ b/lib/hostip4.c @@ -423,7 +423,11 @@ Curl_addrinfo *Curl_he2ai(struct hostent *he, int port) prevai->ai_next = ai; ai->ai_family = AF_INET; /* we only support this */ - ai->ai_socktype = SOCK_STREAM; /* we only support this */ + if(port == PORT_TFTP) + ai->ai_socktype = SOCK_DGRAM; + else + ai->ai_socktype = SOCK_STREAM; + ai->ai_addrlen = sizeof(struct sockaddr_in); /* make the ai_addr point to the address immediately following this struct and use that area to store the address */ |