aboutsummaryrefslogtreecommitdiff
path: root/lib/hostip6.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-09-02 15:11:08 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-09-02 15:11:08 +0000
commit56d9624b566ac15ffb4b4b6eef220a5000b767e0 (patch)
tree9511f37ced87ba79fe96416b21e41fadffe17224 /lib/hostip6.c
parent911d135deb619f6d18ae3e0150c3808be54831a3 (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/hostip6.c')
-rw-r--r--lib/hostip6.c7
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);