Develop and Download Open Source Software

Browse Subversion Repository

Diff of /trunk/ftp_reset.c

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

revision 36 by hirohitohigashi, Sun Mar 1 13:40:55 2009 UTC revision 38 by hirohitohigashi, Sun Mar 1 15:51:51 2009 UTC
# Line 37  int ftp_reset( LIBOFTP *ftp ) Line 37  int ftp_reset( LIBOFTP *ftp )
37  {  {
38      int now_timeout_sec = ftp->timeout_sec;      int now_timeout_sec = ftp->timeout_sec;
39      int ret;      int ret;
40        int i;
41    
42      /*      /*
43       * send "CRLF" only       * send "CRLF" only
# Line 47  int ftp_reset( LIBOFTP *ftp ) Line 48  int ftp_reset( LIBOFTP *ftp )
48      }      }
49    
50      /*      /*
51       * receive response until timeout.       * receive response until timeout. 100 cycle maxmum.
52       */       */
53      ftp_timeout( ftp, 1 );      /* set 1 sec */      ftp_timeout( ftp, 1 );      /* set 1 sec */
54    
55      while( 1 ) {      for( i = 0; i < 100; i++ ) {
56          ret = ftp_receive_response( ftp, 0, 0 );          ret = ftp_receive_response( ftp, 0, 0 );