home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume38 / libftp / part01 / FtpBye.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-13  |  336 b   |  22 lines

  1. #include "FtpLibrary.h"
  2.  
  3. STATUS FtpBye(FTP *sock)
  4. {
  5.   String S1;
  6.   int i;
  7.   
  8.   if ( FtpSendMessage(sock,"QUIT") == QUIT )
  9.     return EXIT(sock,QUIT);
  10.  
  11.   if ( (i=FtpGetMessage(sock,S1)) == QUIT )
  12.     return EXIT(sock,QUIT);
  13.  
  14.   if ( i != 221 )
  15.     return EXIT(sock,-i);
  16.  
  17.   close(sock->sock);
  18.   free(sock);
  19.   return EXIT(sock,i);
  20. }
  21.       
  22.