diff options
author | Daniel Stenberg <daniel@haxx.se> | 2005-09-16 21:30:08 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2005-09-16 21:30:08 +0000 |
commit | e7093b3ca8f54a9d67a078ce37afdc825c86fdf4 (patch) | |
tree | 7eceb12a79f2c7f98f920768abc58e334873e6b5 /lib/url.c | |
parent | d0a4104c0cb1c8b4c1e02ae314a1ad4831d37d4a (diff) | |
download | curl-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/url.c')
-rw-r--r-- | lib/url.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -2729,6 +2729,8 @@ static CURLcode CreateConnection(struct SessionHandle *data, * Setup internals depending on protocol *************************************************************/ + conn->socktype = SOCK_STREAM; /* most of them are TCP streams */ + if (strequal(conn->protostr, "HTTP")) { #ifndef CURL_DISABLE_HTTP conn->port = PORT_HTTP; @@ -2927,12 +2929,13 @@ static CURLcode CreateConnection(struct SessionHandle *data, else if (strequal(conn->protostr, "TFTP")) { #ifndef CURL_DISABLE_TFTP char *type; + conn->socktype = SOCK_DGRAM; /* UDP datagram based */ conn->protocol |= PROT_TFTP; conn->port = PORT_TFTP; conn->remote_port = PORT_TFTP; conn->curl_connect = Curl_tftp_connect; conn->curl_do = Curl_tftp; - conn->curl_done = Curl_tftp_done; + conn->curl_done = Curl_tftp_done; /* TFTP URLs support an extension like ";mode=<typecode>" that * we'll try to get now! */ type=strstr(conn->path, ";mode="); |