bug-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-inetutils] already connected when closed


From: Karl Berry
Subject: Re: [bug-inetutils] already connected when closed
Date: Sat, 30 Jun 2007 13:51:33 -0500

    +  if (connected && 
    +      command ("NOOP") != COMPLETE)

When the connection has closed, I now get a SIGPIPE in the NOOP,
specifically at the fflush(cout); at line 369 of ftp.c (in inetutils 1.5,
sorry, I don't have a CVS checkout just now.)

If it's not too hard to fix that, I do think it would be ideal to give
the warning if the connection is still open.  As in the change below.

The biggest reason I'm bothering you about this is because when I upload
a file to ftp-upload, I habitually want to check to see if the upload
has succeeded.  That's the case I'm trying to minimize commands/trouble
for.  Sometimes the connection times out, sometimes it doesn't, but I
still want to stay connected to the same host, not be disconnected
unnecessarily.

Thanks,
Karl


*** /usr/local/gnu/src/inetutils-1.5/ftp/ORIG/cmds.c    Wed Oct 11 14:46:22 2006
--- /usr/local/gnu/src/inetutils-1.5/ftp/cmds.c Sat Jun 30 11:33:26 2007
***************
*** 173,177 ****
        int port;
  
!       if (connected) {
                printf("Already connected to %s, use close first.\n",
                        hostname);
--- 173,179 ----
        int port;
  
!       if (connected && command ("NOOP") != COMPLETE) {
!               disconnect (0, 0);
!       } else if (connected) {
                printf("Already connected to %s, use close first.\n",
                        hostname);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]