]> granicus.if.org Git - curl/commitdiff
ftp: response timeout bug in "quote" sending
authorJan Van Boghout <lists@macrabbit.com>
Sat, 17 Jul 2010 22:44:25 +0000 (00:44 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 17 Jul 2010 22:44:25 +0000 (00:44 +0200)
The FTP implementation was missing a timestamp reset point, making the
waiting for responses after sending a post-transfer "QUOTE" command not
working as supposedly. This bug was introduced in 7.20.0

lib/ftp.c

index ac47258bc0b36600534b95aac30838fe9bbddbb4..c3de7e0bc1bd0e14e39ab00608d1a95417523a60 100644 (file)
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -3203,6 +3203,8 @@ CURLcode ftp_sendquote(struct connectdata *conn, struct curl_slist *quote)
   ssize_t nread;
   int ftpcode;
   CURLcode result;
+  struct ftp_conn *ftpc = &conn->proto.ftpc;
+  struct pingpong *pp = &ftpc->pp;
 
   item = quote;
   while(item) {
@@ -3222,6 +3224,8 @@ CURLcode ftp_sendquote(struct connectdata *conn, struct curl_slist *quote)
 
       FTPSENDF(conn, "%s", cmd);
 
+      pp->response = Curl_tvnow(); /* timeout relative now */
+
       result = Curl_GetFTPResponse(&nread, conn, &ftpcode);
       if(result)
         return result;