could you test it once just to see that it works?

Worked fine, except there's a typo in the comment :).  Fixed below.
Also, here again is the change to cmds.c to send the NOOP.

Thanks,
Karl

Index: cmds.c
===================================================================
RCS file: /sources/inetutils/inetutils/ftp/cmds.c,v
retrieving revision 1.33
diff -c -2 -r1.33 cmds.c
*** cmds.c      29 Jun 2007 16:29:34 -0000      1.33
--- cmds.c      15 Jul 2007 16:38:48 -0000
***************
*** 170,175 ****
    int port;
  
!   if (connected)
      disconnect (0, 0);
    if (argc < 2)
      another (&argc, &argv, "to");
--- 170,181 ----
    int port;
  
!   if (connected && command ("NOOP") != COMPLETE) {
      disconnect (0, 0);
+   } else if (connected) {
+     printf ("Already connected to %s, use close first.\n", hostname);
+     code = -1;
+     return;
+   }
+ 
    if (argc < 2)
      another (&argc, &argv, "to");
Index: ftp.c
===================================================================
RCS file: /sources/inetutils/inetutils/ftp/ftp.c,v
retrieving revision 1.30
diff -c -2 -r1.30 ftp.c
*** ftp.c       21 Oct 2006 18:08:45 -0000      1.30
--- ftp.c       15 Jul 2007 16:38:52 -0000
***************
*** 376,379 ****
--- 376,381 ----
      }
    oldintr = signal (SIGINT, cmdabort);
+   /* Under weird circumstances, we get a SIGPIPE from fflush().  */
+   signal (SIGPIPE, SIG_IGN);
  #if defined(HAVE_STDARG_H) && defined(__STDC__) && __STDC__
    va_start (ap, fmt);
***************
*** 391,394 ****
--- 393,397 ----
      (*oldintr) (SIGINT);
    signal (SIGINT, oldintr);
+   signal (SIGPIPE, SIG_DFL);
    return (r);
  }


_______________________________________________
bug-inetutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-inetutils

Reply via email to