mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
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...
This commit is contained in:
parent
4f1465e7c7
commit
64298e528d
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user