Hi,

there are quite some ftp servers out there that limit the
number of concurrent connections, sometimes to only a few.

It is hard to get a login to those sometimes, so you have 
to keep on trying for quite some time.

I do however think it would be a good idea to use a retry
timeout of opt.waitretry seconds from the beginning, else
the owner of the server might become angry....

So here is a little patch, that increases the wait period
to the max immediately in case the ftp server refuses the
login. Let's be polite...

It _is_ a quick hack, misusing the count variable, this way
there's no need to change sleep_between_retrievals().


BTW, I'm not subscribed to the wget mailing list, so pls.
cc any reply directly to me.

Thnx, 
Regards,

Mark Halpaap.




--- wget-1.7/src/ftp.c  Sun May 27 21:34:58 2001
+++ wget-1.7.mark/src/ftp.c     Mon Oct 15 14:52:43 2001
@@ -1102,10 +1102,16 @@
          /* Fatal errors, give up.  */
          return err;
          break;
+       case FTPLOGREFUSED: 
+         /* Does not make sense to bug the server once a second if it */
+         /* doesn't want you to login right now. */
+         /* So if we wanted a wait in between retries in the first place */
+         /* it might be a good idea to start adhering to it... */
+         if (opt.waitretry) count = opt.waitretry;
        case CONSOCKERR: case CONERROR: case FTPSRVERR: case FTPRERR:
        case WRITEFAILED: case FTPUNKNOWNTYPE: case CONPORTERR:
        case BINDERR: case LISTENERR: case ACCEPTERR:
-       case FTPPORTERR: case FTPLOGREFUSED: case FTPINVPASV:
+       case FTPPORTERR: case FTPINVPASV:
          printwhat (count, opt.ntry);
          /* non-fatal errors */
          continue;

Reply via email to