diff options
Diffstat (limited to 'libs/libcurl/src/ftp.c')
| -rw-r--r-- | libs/libcurl/src/ftp.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/libs/libcurl/src/ftp.c b/libs/libcurl/src/ftp.c index 20991676f1..9216aee564 100644 --- a/libs/libcurl/src/ftp.c +++ b/libs/libcurl/src/ftp.c @@ -250,6 +250,7 @@ const struct Curl_handler Curl_handler_ftp = { ZERO_NULL, /* write_resp_hd */
ZERO_NULL, /* connection_check */
ZERO_NULL, /* attach connection */
+ ZERO_NULL, /* follow */
PORT_FTP, /* defport */
CURLPROTO_FTP, /* protocol */
CURLPROTO_FTP, /* family */
@@ -282,6 +283,7 @@ const struct Curl_handler Curl_handler_ftps = { ZERO_NULL, /* write_resp_hd */
ZERO_NULL, /* connection_check */
ZERO_NULL, /* attach connection */
+ ZERO_NULL, /* follow */
PORT_FTPS, /* defport */
CURLPROTO_FTPS, /* protocol */
CURLPROTO_FTP, /* family */
@@ -2079,10 +2081,19 @@ static CURLcode ftp_state_mdtm_resp(struct Curl_easy *data, /* If we asked for a time of the file and we actually got one as well,
we "emulate" an HTTP-style header in our output. */
+#if defined(__GNUC__) && (defined(__DJGPP__) || defined(__AMIGA__))
+#pragma GCC diagnostic push
+/* 'time_t' is unsigned in MSDOS and AmigaOS. Silence:
+ warning: comparison of unsigned expression in '>= 0' is always true */
+#pragma GCC diagnostic ignored "-Wtype-limits"
+#endif
if(data->req.no_body &&
ftpc->file &&
data->set.get_filetime &&
(data->info.filetime >= 0) ) {
+#if defined(__GNUC__) && (defined(__DJGPP__) || defined(__AMIGA__))
+#pragma GCC diagnostic pop
+#endif
char headerbuf[128];
int headerbuflen;
time_t filetime = data->info.filetime;
@@ -3154,7 +3165,7 @@ static CURLcode ftp_connect(struct Curl_easy *data, PINGPONG_SETUP(pp, ftp_statemachine, ftp_endofresp);
- if(conn->handler->flags & PROTOPT_SSL) {
+ if(Curl_conn_is_ssl(conn, FIRSTSOCKET)) {
/* BLOCKING */
result = Curl_conn_connect(data, FIRSTSOCKET, TRUE, done);
if(result)
@@ -4096,11 +4107,6 @@ static CURLcode ftp_disconnect(struct Curl_easy *data, return CURLE_OK;
}
-#ifdef _MSC_VER
-/* warning C4706: assignment within conditional expression */
-#pragma warning(disable:4706)
-#endif
-
/***********************************************************************
*
* ftp_parse_url_path()
@@ -4191,7 +4197,8 @@ CURLcode ftp_parse_url_path(struct Curl_easy *data) }
/* parse the URL path into separate path components */
- while((slashPos = strchr(curPos, '/'))) {
+ /* !checksrc! disable EQUALSNULL 1 */
+ while((slashPos = strchr(curPos, '/')) != NULL) {
size_t compLen = slashPos - curPos;
/* path starts with a slash: add that as a directory */
@@ -4244,7 +4251,7 @@ CURLcode ftp_parse_url_path(struct Curl_easy *data) else
n -= ftpc->file ? strlen(ftpc->file) : 0;
- if((strlen(oldPath) == n) && !strncmp(rawPath, oldPath, n)) {
+ if((strlen(oldPath) == n) && rawPath && !strncmp(rawPath, oldPath, n)) {
infof(data, "Request has same path as previous transfer");
ftpc->cwddone = TRUE;
}
|
