temporary fix for ftp communication to xps from fast machines. Previously it

was cutting the messages short, this fix waits for the xps to respond fully to
the FIRST command before continuing. This needs to be done properly in other
places
This commit is contained in:
Peter Denison
2008-05-22 16:56:30 +00:00
parent 4c2dff5408
commit da18f8827f
+4 -2
View File
@@ -46,8 +46,10 @@ int ftpConnect (char* ip, char* login, char* password, int* socketFD)
if (connect(sockFD, (struct sockaddr *)&sockAddr, sizeof(sockAddr)) < 0)
return -1;
receivedBytes = recv(sockFD, returnString, RETURN_SIZE, 0);
do {
receivedBytes = recv(sockFD, returnString, RETURN_SIZE, 0);
}
while (strchr(returnString,'\n')==NULL);
/* login */
sprintf(command, "USER %s", login);