projects
/
curl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4f1465e
)
Use SOCK_DGRAM for TFTP. Consider setting this up at one central place, we
author
Daniel Stenberg
<daniel@haxx.se>
Tue, 6 Sep 2005 10:37:57 +0000
(10:37 +0000)
committer
Daniel Stenberg
<daniel@haxx.se>
Tue, 6 Sep 2005 10:37:57 +0000
(10:37 +0000)
have this check done on far too many places by now...
lib/hostthre.c
patch
|
blob
|
history
diff --git
a/lib/hostthre.c
b/lib/hostthre.c
index 13761c5875ed1a57aa057fd20e3bad61985e3d26..ebd9e7dc589ee2f1092c36953aeb2600798c5c4c 100644
(file)
--- 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);