summaryrefslogtreecommitdiff
path: root/lib/hostip4.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-09-16 21:30:08 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-09-16 21:30:08 +0000
commite7093b3ca8f54a9d67a078ce37afdc825c86fdf4 (patch)
tree7eceb12a79f2c7f98f920768abc58e334873e6b5 /lib/hostip4.c
parentd0a4104c0cb1c8b4c1e02ae314a1ad4831d37d4a (diff)
downloadcurl-e7093b3ca8f54a9d67a078ce37afdc825c86fdf4.tar.gz
keep 'socktype' in the connectdata struct and make sure we use that for all
protocol sockets even if the resolved address may say otherwise
Diffstat (limited to 'lib/hostip4.c')
-rw-r--r--lib/hostip4.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/hostip4.c b/lib/hostip4.c
index d9277b960..c7bdb6dc9 100644
--- a/lib/hostip4.c
+++ b/lib/hostip4.c
@@ -423,10 +423,10 @@ Curl_addrinfo *Curl_he2ai(struct hostent *he, int port)
prevai->ai_next = ai;
ai->ai_family = AF_INET; /* we only support this */
- if(port == PORT_TFTP)
- ai->ai_socktype = SOCK_DGRAM;
- else
- ai->ai_socktype = SOCK_STREAM;
+
+ /* we return all names as STREAM, so when using this address for TFTP
+ the type must be ignored and conn->socktype be used instead! */
+ ai->ai_socktype = SOCK_STREAM;
ai->ai_addrlen = sizeof(struct sockaddr_in);
/* make the ai_addr point to the address immediately following this struct