Develop and Download Open Source Software

Browse Subversion Repository

Diff of /trunk/ftp_quit.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 30 by hirohitohigashi, Sat Feb 28 13:03:02 2009 UTC revision 32 by hirohitohigashi, Sat Feb 28 15:03:18 2009 UTC
# Line 9  Line 9 
9    
10  /***** Feature test switches ************************************************/  /***** Feature test switches ************************************************/
11  /***** System headers *******************************************************/  /***** System headers *******************************************************/
12  #include <stdio.h>  #include <unistd.h>
 #include <string.h>  
13    
14    
15  /***** Local headers ********************************************************/  /***** Local headers ********************************************************/
# Line 49  int ftp_quit( LIBOFTP *ftp ) Line 48  int ftp_quit( LIBOFTP *ftp )
48      }      }
49    
50      res = ftp_receive_response( ftp, ftp->error_message, sizeof(ftp->error_message)-1 );      res = ftp_receive_response( ftp, ftp->error_message, sizeof(ftp->error_message)-1 );
51      if( res != 221 ) {                                          /* 221: Service closing control connection. */      if( res == 221 ) {                                          /* 221: Service closing control connection. */
52            res = LIBOFTP_NOERROR;
53        } else {
54          DEBUGPRINT1( "command response error. %d\n", res );          DEBUGPRINT1( "command response error. %d\n", res );
55          return res < 0? res: LIBOFTP_ERROR_PROTOCOL;          if( res >= 0 ) res = LIBOFTP_ERROR_PROTOCOL;
56      }      }
57    
58      return 0;      /*
59         * close socket.
60         */
61        close( ftp->socket );
62        ftp->socket = 0;
63    
64        return res;
65  }  }

Legend:
Removed from v.30  
changed lines
  Added in v.32

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26