/[monit]/monit/protocols/ftp.c
ViewVC logotype

Diff of /monit/protocols/ftp.c

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

revision 1.20 by hauk, Sat Sep 10 12:47:51 2005 UTC revision 1.21 by hauk, Wed Oct 19 00:50:38 2005 UTC
# Line 51  int check_ftp(Socket_T s) { Line 51  int check_ftp(Socket_T s) {
51    
52    ASSERT(s);    ASSERT(s);
53    
54    if(! socket_readln(s, buf, STRLEN)) {    if(!socket_readln(s, buf, STRLEN)) {
55      log("FTP: error receiving data -- %s\n", STRERROR);      log("FTP: error receiving data -- %s\n", STRERROR);
56      return FALSE;      return FALSE;
57    }    }
# Line 64  int check_ftp(Socket_T s) { Line 64  int check_ftp(Socket_T s) {
64      return FALSE;      return FALSE;
65    }    }
66    
67    /* Read past banners */    /* Clear any extra data read from the server, such as banners */
68    while(NULL != socket_readln(s, buf, STRLEN)) {    socket_reset(s);
     if(!Util_startsWith(buf, "220")) break;  
   }  
69        
70    if(socket_print(s, "QUIT\r\n") < 0) {    if(socket_print(s, "QUIT\r\n") < 0) {
71      log("FTP: error sending data -- %s\n", STRERROR);      log("FTP: error sending data -- %s\n", STRERROR);

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26