aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-09-06 10:37:57 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-09-06 10:37:57 +0000
commit64298e528d436cfc0f5ae14ddf39768f57c648e5 (patch)
treef184a3fc556eb08ee335f8907c20499d783aee70
parent4f1465e7c780fb77369acbead3a6150552f5c58a (diff)
Use SOCK_DGRAM for TFTP. Consider setting this up at one central place, we
have this check done on far too many places by now...
-rw-r--r--lib/hostthre.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/hostthre.c b/lib/hostthre.c
index 13761c587..ebd9e7dc5 100644
--- a/lib/hostthre.c
+++ b/lib/hostthre.c
@@ -804,7 +804,10 @@ 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_CANONNAME;
itoa(port, sbuf, 10);