RCS file: /cvsroot/filezilla/FileZilla/source/ControlSocket.cpp,v
retrieving revision 1.33
diff -u -b -r1.33 ControlSocket.cpp
|
|
|
200 | 200 | //Check for multi-line responses |
201 | 201 | if (m_RecvBuffer[m_RecvBuffer.GetUpperBound()-1].GetLength()>3) |
202 | 202 | { |
203 | | if (m_RecvBuffer[m_RecvBuffer.GetUpperBound()-1][3]=='-') |
| 203 | if (m_MultiLine!="") // multi-line was started |
204 | 204 | { |
205 | | m_MultiLine=m_RecvBuffer[m_RecvBuffer.GetUpperBound()-1].Left(3); |
| 205 | if (m_RecvBuffer[m_RecvBuffer.GetUpperBound()-1].Left(4)!=m_MultiLine) |
206 | 206 | m_RecvBuffer.RemoveAt(m_RecvBuffer.GetUpperBound()-1); |
207 | | } |
208 | | else if (m_MultiLine!="") |
209 | | { |
210 | | if (m_RecvBuffer[m_RecvBuffer.GetUpperBound()-1].Left(3)!=m_MultiLine) |
211 | | m_RecvBuffer.RemoveAt(m_RecvBuffer.GetUpperBound()-1); |
212 | | else |
| 207 | else // end of multi-line found |
213 | 208 | { |
214 | 209 | m_MultiLine=""; |
215 | 210 | AfxGetThread()->PostThreadMessage(WM_THREADMSG,FTM_PROCESSREPLY,0); |
216 | 211 | } |
217 | 212 | } |
| 213 | // start of new multi-line |
| 214 | else if (m_RecvBuffer[m_RecvBuffer.GetUpperBound()-1][3]=='-') |
| 215 | { |
| 216 | // DDD<SP> is the end of a multi-line response |
| 217 | m_MultiLine=m_RecvBuffer[m_RecvBuffer.GetUpperBound()-1].Left(3)+' '; |
| 218 | m_RecvBuffer.RemoveAt(m_RecvBuffer.GetUpperBound()-1); |
| 219 | } |
218 | 220 | else |
219 | 221 | AfxGetThread()->PostThreadMessage(WM_THREADMSG,FTM_PROCESSREPLY,0); |
220 | 222 | } |
221 | 223 | else |
222 | 224 | m_RecvBuffer.RemoveAt(m_RecvBuffer.GetUpperBound()-1); |
223 | | |
224 | | |
225 | | |
226 | 225 | } |
227 | 226 | } |
228 | 227 | else |