On Wed, Oct 24, 2007 at 02:52:12PM +1000, Michael wrote:
> I've just come across what seems to be a problem with the slot command,
Here is the patch to fix it.
--
Alexander.
Index: CmdExec.cc
===================================================================
RCS file: /home/lav/cvsroot/lftp/src/CmdExec.cc,v
retrieving revision 1.139
retrieving revision 1.140
diff -u -p -r1.139 -r1.140
--- CmdExec.cc 17 Sep 2007 14:01:26 -0000 1.139
+++ CmdExec.cc 24 Oct 2007 14:38:48 -0000 1.140
@@ -18,7 +18,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: CmdExec.cc,v 1.139 2007/09/17 14:01:26 lav Exp $ */
+/* $Id: CmdExec.cc,v 1.140 2007/10/24 14:38:48 lav Exp $ */
#include <config.h>
#include <errno.h>
@@ -322,12 +322,12 @@ void CmdExec::ChangeSlot(const char *n)
slot.set(0);
return;
}
- FileAccess *s=ConnectionSlot::FindSession(n);
+ slot.set(n);
+ const FileAccess *s=ConnectionSlot::FindSession(n);
if(!s)
ConnectionSlot::Set(n,session);
else
ChangeSession(s->Clone());
- slot.set(n);
}
int CmdExec::Do()