1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

(Curl_GetFTPResponse) moved some code to only get performed when actually

needed
This commit is contained in:
Daniel Stenberg 2002-04-27 13:09:37 +00:00
parent 8358505b6d
commit 15b2a3af91

View File

@ -235,11 +235,11 @@ int Curl_GetFTPResponse(char *buf,
keepon=TRUE; keepon=TRUE;
while((nread<BUFSIZE) && (keepon && !error)) { while((nread<BUFSIZE) && (keepon && !error)) {
if(!ftp->cache) {
readfd = rkeepfd; /* set every lap */ readfd = rkeepfd; /* set every lap */
interval.tv_sec = timeout; interval.tv_sec = timeout;
interval.tv_usec = 0; interval.tv_usec = 0;
if(!ftp->cache)
switch (select (sockfd+1, &readfd, NULL, NULL, &interval)) { switch (select (sockfd+1, &readfd, NULL, NULL, &interval)) {
case -1: /* select() error, stop reading */ case -1: /* select() error, stop reading */
error = SELECT_ERROR; error = SELECT_ERROR;
@ -253,6 +253,7 @@ int Curl_GetFTPResponse(char *buf,
error = SELECT_OK; error = SELECT_OK;
break; break;
} }
}
if(SELECT_OK == error) { if(SELECT_OK == error) {
/* /*
* This code previously didn't use the kerberos sec_read() code * This code previously didn't use the kerberos sec_read() code