> >On Sat, Apr 22, 2006 at 07:02:03PM -0400, Justin Piszcz wrote:
> >>$ lftp box1
> >>(hangs), lftp uses 99% cpu
Please try this patch. The problem only happens when a port is
explicitly specified.
--
Alexander.
Index: commands.cc
===================================================================
RCS file: /home/lav/cvsroot/lftp/src/commands.cc,v
retrieving revision 1.245
diff -u -p -r1.245 commands.cc
--- commands.cc 19 Apr 2006 09:48:05 -0000 1.245
+++ commands.cc 24 Apr 2006 07:06:34 -0000
@@ -906,18 +906,6 @@ Job *CmdExec::builtin_open()
{
cwd_history.Set(session,session->GetCwd());
- FileAccess *new_session=FileAccess::New(uc.proto,uc.host);
- if(!new_session)
- {
- eprintf("%s: %s%s\n",args->a0(),uc.proto,
- _(" - not supported protocol"));
- return 0;
- }
-
- saved_session=session;
- session=0;
- ChangeSession(new_session);
-
if(uc.user && !user)
user=uc.user;
if(uc.pass && !pass)
@@ -930,6 +918,18 @@ Job *CmdExec::builtin_open()
port=uc.port;
if(uc.path && !path)
path=uc.path;
+
+ FileAccess *new_session=FileAccess::New(uc.proto,host,port);
+ if(!new_session)
+ {
+ eprintf("%s: %s%s\n",args->a0(),uc.proto,
+ _(" - not supported protocol"));
+ return 0;
+ }
+
+ saved_session=session;
+ session=0;
+ ChangeSession(new_session);
}
// user gets substituted only if no proto is specified.