Develop and Download Open Source Software

Browse Subversion Repository

Diff of /trunk/ftp_put_buffer.c

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

revision 28 by hirohitohigashi, Sat Feb 28 04:14:38 2009 UTC revision 29 by hirohitohigashi, Sat Feb 28 12:48:31 2009 UTC
# Line 47  static int ftp_put_buffer_main( LIBOFTP Line 47  static int ftp_put_buffer_main( LIBOFTP
47  {  {
48      int data_socket;      int data_socket;
49      char *p = buf;      char *p = buf;
50      int n;      int n, res;
51    
52      /*      /*
53       * 送信準備       * 送信準備
# Line 72  static int ftp_put_buffer_main( LIBOFTP Line 72  static int ftp_put_buffer_main( LIBOFTP
72          n = sendn( data_socket, p, len, 0 );          n = sendn( data_socket, p, len, 0 );
73          DEBUGPRINT1( "SEND: n=%d\n", n );          DEBUGPRINT1( "SEND: n=%d\n", n );
74          if( n < 0 ) {          if( n < 0 ) {
75                DEBUGPRINT1( "recv error. %s\n", strerror(errno) );
76                copy_strerror();
77              close( data_socket );              close( data_socket );
78              return -1;              return LIBOFTP_ERROR_OS;
79          }          }
80    
81          p += n;          p += n;
# Line 87  static int ftp_put_buffer_main( LIBOFTP Line 89  static int ftp_put_buffer_main( LIBOFTP
89      /*      /*
90       * receive response.       * receive response.
91       */       */
92      if( ftp_receive_response( ftp, 0, 0 ) != 226 ) {    /* 226: Closing data connection. */      res = ftp_receive_response( ftp, ftp->error_message, sizeof(ftp->error_message)-1 );
93          return -2;      if( res != 226 ) {                                          /* 226: Closing data connection. */
94            DEBUGPRINT1( "got illegal response %d\n", res );
95            return res < 0? res: LIBOFTP_ERROR_PROTOCOL;
96      }      }
97    
98      return 0;      return LIBOFTP_NOERROR;
99  }  }
100    
101    

Legend:
Removed from v.28  
changed lines
  Added in v.29

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