1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

This can be used in another place (Curl_ftp_done :)...

declare at the top of the file, put the private functions at the bottom of
the file, however, this is clearer imho (since _ftp is already there).
This commit is contained in:
Sterling Hughes 2001-08-15 06:58:56 +00:00
parent 10ab082188
commit 09a9b57bae

View File

@ -91,6 +91,9 @@
#include "memdebug.h" #include "memdebug.h"
#endif #endif
/* Used in more than one place in the file */
static CURLcode _ftp_sendquote(struct connectdata *conn, struct curl_slist *quote);
/* easy-to-use macro: */ /* easy-to-use macro: */
#define ftpsendf Curl_ftpsendf #define ftpsendf Curl_ftpsendf
@ -575,25 +578,8 @@ CURLcode Curl_ftp_done(struct connectdata *conn)
/* Send any post-transfer QUOTE strings? */ /* Send any post-transfer QUOTE strings? */
if(data->postquote) { if(data->postquote) {
qitem = data->postquote; CURLcode result = _ftp_sendquote(conn, data->postquote);
/* Send all QUOTE strings in same order as on command-line */ return result;
while (qitem) {
/* Send string */
if (qitem->data) {
ftpsendf(conn->firstsocket, conn, "%s", qitem->data);
nread = Curl_GetFTPResponse(conn->firstsocket, buf, conn, &ftpcode);
if(nread < 0)
return CURLE_OPERATION_TIMEOUTED;
if (ftpcode >= 400) {
failf(data, "QUOT string not accepted: %s",
qitem->data);
return CURLE_FTP_QUOTE_ERROR;
}
}
qitem = qitem->next;
}
} }
return CURLE_OK; return CURLE_OK;