keep 'socktype' in the connectdata struct and make sure we use that for all

protocol sockets even if the resolved address may say otherwise
This commit is contained in:
Daniel Stenberg
2005-09-16 21:30:08 +00:00
parent d0a4104c0c
commit e7093b3ca8
7 changed files with 22 additions and 21 deletions

View File

@@ -858,7 +858,7 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
* Workaround for AIX5 getaddrinfo() problem (it doesn't set ai_socktype):
*/
if (ai->ai_socktype == 0)
ai->ai_socktype = SOCK_STREAM;
ai->ai_socktype = conn->socktype;
portsock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
if (portsock == CURL_SOCKET_BAD) {