Develop and Download Open Source Software

Browse Subversion Repository

Diff of /trunk/ftp_user.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 47  int ftp_auth( LIBOFTP *ftp, const char * Line 47  int ftp_auth( LIBOFTP *ftp, const char *
47       * send user name.       * send user name.
48       */       */
49      snprintf( str1, sizeof(str1)-1, "USER %s\r\n", user );      snprintf( str1, sizeof(str1)-1, "USER %s\r\n", user );
50      if( sendn( ftp->socket, str1, strlen( str1 ), 0 ) < 0 ) {      if( ftp_send_command( ftp, str1 ) < 0 ) {
51          DEBUGPRINT1( "auth: user command sending error.%s\n", "" );          DEBUGPRINT1( "auth: user command sending error.%s\n", "" );
52          return -1;          return -1;
53      }      }
# Line 60  int ftp_auth( LIBOFTP *ftp, const char * Line 60  int ftp_auth( LIBOFTP *ftp, const char *
60       * send password.       * send password.
61       */       */
62      snprintf( str1, sizeof(str1)-1, "PASS %s\r\n", pass );      snprintf( str1, sizeof(str1)-1, "PASS %s\r\n", pass );
63      if( sendn( ftp->socket, str1, strlen( str1 ), 0 ) < 0 ) {      if( ftp_send_command( ftp, str1 ) < 0 ) {
64          DEBUGPRINT1( "auth: pass command sending error.%s\n", "" );          DEBUGPRINT1( "auth: pass command sending error.%s\n", "" );
65          return -1;          return -1;
66      }      }
# Line 75  PROCEED: Line 75  PROCEED:
75       * system type.       * system type.
76       */       */
77      snprintf( str1, sizeof(str1)-1, "SYST\r\n" );      snprintf( str1, sizeof(str1)-1, "SYST\r\n" );
78      if( sendn( ftp->socket, str1, strlen( str1 ), 0 ) < 0 ) {      if( ftp_send_command( ftp, str1 ) < 0 ) {
79          DEBUGPRINT1( "auth: syst command sending error.%s\n", "" );          DEBUGPRINT1( "auth: syst command sending error.%s\n", "" );
80          return -1;          return -1;
81      }      }

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