Commit 64298e52 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

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...
parent 4f1465e7
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -804,6 +804,9 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,

  memset(&hints, 0, sizeof(hints));
  hints.ai_family = pf;
  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);