Develop and Download Open Source Software

Browse Subversion Repository

Diff of /tags/REL-2.2/ftp_get_buffer.c

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

revision 17 by hirohitohigashi, Wed Feb 25 13:47:38 2009 UTC revision 20 by hirohitohigashi, Fri Feb 27 11:30:10 2009 UTC
# Line 46  int ftp_get_buffer( LIBOFTP *ftp, const Line 46  int ftp_get_buffer( LIBOFTP *ftp, const
46  {  {
47      int data_socket;      int data_socket;
48      char *p = buf;      char *p = buf;
49      int n;      int n, res;
50    
51      /*      /*
52       * 受信準備       * 受信準備
53       */       */
54      if( ftp->flag_passive ) {      if( ftp->flag_passive ) {
55          data_socket = ftp_getready_pasv( ftp, fname, "RETR" );          data_socket = ftp_getready_pasv( ftp, fname, "RETR" );
         if( data_socket < 0 ) {  
             return -1;          /* XXX: mixed os level error and ftp protocol error. */  
         }  
56      } else {      } else {
57          return -2;              /* XXX: active mode not ready yet. */          data_socket = ftp_getready_active( ftp, fname, "RETR" );
58        }
59        if( data_socket < 0 ) {
60            return data_socket;
61      }      }
62    
63      /*      /*
# Line 88  int ftp_get_buffer( LIBOFTP *ftp, const Line 88  int ftp_get_buffer( LIBOFTP *ftp, const
88      /*      /*
89       * receive response.       * receive response.
90       */       */
91      if( ftp_receive_response( ftp, 0, 0 ) != 226 ) {    /* 226: Closing data connection. */      if( (res = ftp_receive_response( ftp, 0, 0 )) != 226 ) {    /* 226: Closing data connection. */
92            DEBUGPRINT1( "get_buffer: got illegal response %d\n", res );
93          return -2;          return -2;
94      }      }
95    

Legend:
Removed from v.17  
changed lines
  Added in v.20

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