Develop and Download Open Source Software

Browse Subversion Repository

Diff of /trunk/ftp_open.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 62  int ftp_connect( LIBOFTP *ftp, const cha Line 62  int ftp_connect( LIBOFTP *ftp, const cha
62          ftp->error_no = h_errno;          ftp->error_no = h_errno;
63          return -1;          return -1;
64      }      }
65      ftp->sockaddr.sin_family = AF_INET;      ftp->saddr.sin_family = AF_INET;
66      memcpy( &ftp->sockaddr.sin_addr, p_hostent->h_addr, p_hostent->h_length );      memcpy( &ftp->saddr.sin_addr, p_hostent->h_addr, p_hostent->h_length );
67      ftp->sockaddr.sin_port = htons( port );      ftp->saddr.sin_port = htons( port );
68    
69      /*      /*
70       * make control connection.       * make control connection.
# Line 75  int ftp_connect( LIBOFTP *ftp, const cha Line 75  int ftp_connect( LIBOFTP *ftp, const cha
75          return -2;          return -2;
76      }      }
77    
78      if( connect( ftp->socket, (struct sockaddr *)&(ftp->sockaddr), sizeof(struct sockaddr) ) < 0 ) {      if( connect( ftp->socket, (struct sockaddr *)&(ftp->saddr), sizeof(struct sockaddr) ) < 0 ) {
79          ftp->error_no = errno;          ftp->error_no = errno;
80          return -3;          return -3;
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