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/hostip6.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/hostip6.c')
-rw-r--r-- | lib/hostip6.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/hostip6.c b/lib/hostip6.c index b273efe00..4624e00b8 100644 --- a/lib/hostip6.c +++ b/lib/hostip6.c @@ -251,7 +251,12 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn, memset(&hints, 0, sizeof(hints)); hints.ai_family = pf; - hints.ai_socktype = SOCK_STREAM; + + if(conn->protocol & PROT_TFTP) + hints.ai_socktype = SOCK_DGRAM; + else + hints.ai_socktype = SOCK_STREAM; + hints.ai_flags = ai_flags; snprintf(sbuf, sizeof(sbuf), "%d", port); error = getaddrinfo(hostname, sbuf, &hints, &res); |