]> git.pld-linux.org Git - packages/lftp.git/blob - lftp-bug-36.patch
- rel 4; git fixes
[packages/lftp.git] / lftp-bug-36.patch
1 diff --git a/doc/lftp.1 b/doc/lftp.1
2 index 2123b2c..6da6440 100644
3 --- a/doc/lftp.1
4 +++ b/doc/lftp.1
5 @@ -1749,8 +1749,8 @@ can try to set net:socket-buffer to relatively small value to avoid this.
6  limit accumulating of unused limit-total-rate. 0 means twice of limit-total-rate.
7  .TP
8  .BR net:max-retries \ (number)
9 -the maximum number of sequential retries of an operation without success.
10 -0 means unlimited.
11 +the maximum number of sequential tries of an operation without success.
12 +0 means unlimited. 1 means no retries.
13  .TP
14  .BR net:no-proxy \ (string)
15  contains comma separated list of domains for which proxy should not be used.
16 diff --git a/po/es.po b/po/es.po
17 index 27be471..8794a44 100644
18 --- a/po/es.po
19 +++ b/po/es.po
20 @@ -13,7 +13,7 @@ msgstr ""
21  "Language-Team: Spanish <es@li.org>\n"
22  "Language: es\n"
23  "MIME-Version: 1.0\n"
24 -"Content-Type: text/plain; charset=ISO-8859-1\n"
25 +"Content-Type: text/plain; charset=UTF-8\n"
26  "Content-Transfer-Encoding: 8-bit\n"
27  
28  #: lib/argmatch.c:133
29 diff --git a/po/it.po b/po/it.po
30 index 69aff39..2ffae57 100644
31 --- a/po/it.po
32 +++ b/po/it.po
33 @@ -12,7 +12,7 @@ msgstr ""
34  "Language-Team: Italian <it@li.org>\n"
35  "Language: it\n"
36  "MIME-Version: 1.0\n"
37 -"Content-Type: text/plain; charset=ISO-8859-1\n"
38 +"Content-Type: text/plain; charset=UTF-8\n"
39  "Content-Transfer-Encoding: 8-bit\n"
40  
41  #: lib/argmatch.c:133
42 diff --git a/po/pt_BR.po b/po/pt_BR.po
43 index 95e8e3d..5d1c02d 100644
44 --- a/po/pt_BR.po
45 +++ b/po/pt_BR.po
46 @@ -11,7 +11,7 @@ msgstr ""
47  "Language-Team: pt_BR <pt@li.org>\n"
48  "Language: pt_BR\n"
49  "MIME-Version: 1.0\n"
50 -"Content-Type: text/plain; charset=ISO-8859-1\n"
51 +"Content-Type: text/plain; charset=UTF-8\n"
52  "Content-Transfer-Encoding: 8-bit\n"
53  
54  #: lib/argmatch.c:133
55 diff --git a/src/ChangeLog b/src/ChangeLog
56 index a381272..e5e7c3f 100644
57 --- a/src/ChangeLog
58 +++ b/src/ChangeLog
59 @@ -1,3 +1,14 @@
60 +2013-05-21  Alexander V. Lukyanov <lav@yars.free.net>
61 +
62 +       * FileCopy.cc: set size=NO_SIZE when the size could not be found.
63 +       * FileSet.cc: allow info merging for files with the same basename.
64 +       * Fish.cc: fixed file correption and garbage logging by requiring
65 +         the file to have a size; improve error handling.
66 +
67 +2013-05-20  Alexander V. Lukyanov <lav@yars.free.net>
68 +
69 +       * Fish.cc: disconnect in more cases on Close.
70 +
71  2013-05-13  Alexander V. Lukyanov <lav@yars.free.net>
72  
73         * TorrentTracker.cc, TorrentTracker.h: use xstring for InfoHash and
74 diff --git a/src/FileCopy.cc b/src/FileCopy.cc
75 index 062b140..d0241c4 100644
76 --- a/src/FileCopy.cc
77 +++ b/src/FileCopy.cc
78 @@ -805,8 +805,7 @@ int FileCopyPeerFA::Do()
79          return MOVED;
80        }
81        FileInfo *fi=info[0];
82 -      if(fi->Has(fi->SIZE))
83 -        SetSize(fi->size);
84 +      SetSize(fi->size);
85        if(fi->Has(fi->DATE))
86          SetDate(fi->date);
87        session->Close();
88 diff --git a/src/FileSet.cc b/src/FileSet.cc
89 index a2f5255..49c9df4 100644
90 --- a/src/FileSet.cc
91 +++ b/src/FileSet.cc
92 @@ -48,7 +48,7 @@
93  
94  void  FileInfo::Merge(const FileInfo& f)
95  {
96 -   if(strcmp(name,f.name))
97 +   if(strcmp(basename_ptr(name),basename_ptr(f.name)))
98        return;
99  // int sim=defined&f.defined;
100     int dif=(~defined)&f.defined;
101 diff --git a/src/Fish.cc b/src/Fish.cc
102 index f467781..05870bd 100644
103 --- a/src/Fish.cc
104 +++ b/src/Fish.cc
105 @@ -341,10 +341,13 @@ void Fish::Close()
106     switch(state)
107     {
108     case(DISCONNECTED):
109 -   case(WAITING):
110     case(CONNECTED):
111     case(DONE):
112        break;
113 +   case(WAITING):
114 +      if(mode==STORE || mode==RETRIEVE)
115 +        Disconnect();
116 +      break;
117     case(FILE_SEND):
118        if(!RespQueueIsEmpty())
119          Disconnect();
120 @@ -566,6 +569,8 @@ int Fish::HandleReplies()
121          Disconnect();
122          return MOVED;
123        }
124 +      if(entity_size!=NO_SIZE && real_pos<entity_size)
125 +        return m;
126     }
127     recv_buf->Put(pty_recv_buf->Get(),pty_recv_buf->Size()); // join the messages.
128     pty_recv_buf->Skip(pty_recv_buf->Size());
129 @@ -616,8 +621,14 @@ int Fish::HandleReplies()
130     {
131        if(message==0)
132          message.set(line);
133 -      else
134 -        message.vappend("\n",line.get(),NULL);
135 +      else {
136 +        message.append('\n');
137 +        message.append(line);
138 +        if(state==FILE_RECV && mode==RETRIEVE) {
139 +           SetError(NO_FILE,message);
140 +           return MOVED;
141 +        }
142 +      }
143        return m;
144     }
145  
146 @@ -677,7 +688,7 @@ int Fish::HandleReplies()
147        else if(message && message[0]!='#')
148        {
149          FileInfo *fi=FileInfo::parse_ls_line(message,"GMT");
150 -        if(!fi)
151 +        if(!fi || !strncmp(message,"ls: ",4))
152          {
153             SetError(NO_FILE,message);
154             break;
155 @@ -757,14 +768,14 @@ void Fish::CloseExpectQueue()
156        case EXPECT_PWD:
157        case EXPECT_CWD:
158          break;
159 -      case EXPECT_RETR_INFO:
160        case EXPECT_INFO:
161 -      case EXPECT_RETR:
162        case EXPECT_DIR:
163 -      case EXPECT_QUOTE:
164        case EXPECT_DEFAULT:
165          RespQueue[i]=EXPECT_IGNORE;
166          break;
167 +      case EXPECT_QUOTE:
168 +      case EXPECT_RETR_INFO:
169 +      case EXPECT_RETR:
170        case EXPECT_STOR_PRELIMINARY:
171        case EXPECT_STOR:
172          Disconnect();
This page took 0.043962 seconds and 3 git commands to generate.