Tags: patch
Hi.
If I understood well this long-standing bug, I think I've written a trivial
patch.
Now, if a username is provided and login fails, yafc will sleep 30 sec.
Otherwise, login is interactive, and it will prompt the user immediately.
cheers,
diff -ur yafc-1.1.1/src/login.c yafc-1.1.1.new/src/login.c
--- yafc-1.1.1/src/login.c 2003-07-12 05:21:10.000000000 -0500
+++ yafc-1.1.1.new/src/login.c 2006-09-21 07:37:42.000000000 -0500
@@ -68,7 +68,7 @@
need_connected();
if(ftp->ssh_pid) {
- printf("Can't do this in SSH\n");
+ puts("Can't do this in SSH");
return;
}
@@ -207,7 +207,8 @@
if(r == -1)
break;
- if(gvConnectAttempts == -1 || i+1 < gvConnectAttempts) {
+ if(url->username &&
+ (gvConnectAttempts == -1 || i+1 < gvConnectAttempts)) {
ftp_set_close_handler();
fprintf(stderr, _("Sleeping %u seconds before connecting again"
" (attempt #%d)...\n"),