Hello

Here is a patch to add support for continue mode in fish protocol, this
is easy to implement, should work with any version of dd, and is very
very usefull. Do you think this could be included in future versions of
lftp ?

(Please cc me on answer, I'm not on the list, thanks.)

Best regards

-- 
Loïc

--- lftp-3.0.9/src/Fish.cc      2004-09-09 11:31:44.000000000 +0200
+++ lftp-3.0.9.new/src/Fish.cc  2004-10-20 00:59:21.000000000 +0200
@@ -527,12 +527,19 @@
       real_pos=0;
       break;
    case RETRIEVE:
-      Send("#RETR %s\n"
+      if (pos>0) {
+        Send("#RETR %s\n"
+          "ls -lLd %s; "
+          "echo '### 100'\n"
+           "dd ibs=1 skip=%lld if=%s; echo '### 200'\n",e,e,(long long)pos,e);
+      } else {
+        Send("#RETR %s\n"
           "ls -lLd %s; "
           "echo '### 100'; cat %s; echo '### 200'\n",e,e,e);
+      }
       PushExpect(EXPECT_RETR_INFO);
       PushExpect(EXPECT_RETR);
-      real_pos=0;
+      real_pos=pos;
       break;
    case STORE:
       if(entity_size<0)

Attachment: signature.asc
Description: Digital signature

Reply via email to