home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume38 / libftp / part01 / FtpLogin.c < prev    next >
C/C++ Source or Header  |  1993-07-13  |  480b  |  25 lines

  1. #include "FtpLibrary.h"
  2.  
  3. STATUS FtpLogin ( FTP ** con, char * host , char * user , 
  4.           char * password , char * account)
  5. {
  6.   STATUS x;
  7.   
  8.   if ( (x=FtpConnect(con,host)) < 1)
  9.     return x;
  10.   if ( (x=FtpUser(*con,user)) < 1)
  11.     return x;
  12.   if ( x==230 )
  13.     return x;
  14.   if ( x==332)
  15.     {
  16.       if ( account == NULL )
  17.     return EXIT((*con),x);
  18.       if ( (x=FtpAccount( *con , account )) < 1 )
  19.     return x;
  20.       if ( x==230 )
  21.     return x;
  22.     }
  23.   return FtpPassword(*con,password);
  24. }
  25.