Loading lib/ftp.c +12 −2 Original line number Original line Diff line number Diff line Loading @@ -1000,8 +1000,14 @@ static CURLcode ftp_state_use_port(struct connectdata *conn, result = Curl_pp_sendf(&ftpc->pp, "%s |%d|%s|%hu|", mode[fcmd], result = Curl_pp_sendf(&ftpc->pp, "%s |%d|%s|%hu|", mode[fcmd], sa->sa_family == AF_INET?1:2, sa->sa_family == AF_INET?1:2, myhost, port); myhost, port); if(result) if(result) { Curl_closesocket(conn, portsock); /* don't retry using PORT */ ftpc->count1 = PORT; /* bail out */ state(conn, FTP_STOP); return result; return result; } break; break; } } else if(PORT == fcmd) { else if(PORT == fcmd) { Loading @@ -1021,8 +1027,12 @@ static CURLcode ftp_state_use_port(struct connectdata *conn, snprintf(dest, 20, ",%d,%d", (int)(port>>8), (int)(port&0xff)); snprintf(dest, 20, ",%d,%d", (int)(port>>8), (int)(port&0xff)); result = Curl_pp_sendf(&ftpc->pp, "%s %s", mode[fcmd], tmp); result = Curl_pp_sendf(&ftpc->pp, "%s %s", mode[fcmd], tmp); if(result) if(result) { Curl_closesocket(conn, portsock); /* bail out */ state(conn, FTP_STOP); return result; return result; } break; break; } } } } Loading Loading
lib/ftp.c +12 −2 Original line number Original line Diff line number Diff line Loading @@ -1000,8 +1000,14 @@ static CURLcode ftp_state_use_port(struct connectdata *conn, result = Curl_pp_sendf(&ftpc->pp, "%s |%d|%s|%hu|", mode[fcmd], result = Curl_pp_sendf(&ftpc->pp, "%s |%d|%s|%hu|", mode[fcmd], sa->sa_family == AF_INET?1:2, sa->sa_family == AF_INET?1:2, myhost, port); myhost, port); if(result) if(result) { Curl_closesocket(conn, portsock); /* don't retry using PORT */ ftpc->count1 = PORT; /* bail out */ state(conn, FTP_STOP); return result; return result; } break; break; } } else if(PORT == fcmd) { else if(PORT == fcmd) { Loading @@ -1021,8 +1027,12 @@ static CURLcode ftp_state_use_port(struct connectdata *conn, snprintf(dest, 20, ",%d,%d", (int)(port>>8), (int)(port&0xff)); snprintf(dest, 20, ",%d,%d", (int)(port>>8), (int)(port&0xff)); result = Curl_pp_sendf(&ftpc->pp, "%s %s", mode[fcmd], tmp); result = Curl_pp_sendf(&ftpc->pp, "%s %s", mode[fcmd], tmp); if(result) if(result) { Curl_closesocket(conn, portsock); /* bail out */ state(conn, FTP_STOP); return result; return result; } break; break; } } } } Loading