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

Diff of /monit/protocols/ssh.c

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

revision 1.4 by martinp, Tue Feb 11 21:27:40 2003 UTC revision 1.5 by hauk, Thu Jul 24 00:35:25 2003 UTC
# Line 41  Line 41 
41   *   *
42   *  @file   *  @file
43   */   */
44  int check_ssh(Port_T p) {  int check_ssh(Socket_T s) {
45    
46    char  buf[STRLEN];    char  buf[STRLEN];
47    
48    ASSERT(p);    ASSERT(s);
49            
50    if(port_recv(p, buf, sizeof(buf), 0) <= 0) {    if(socket_read(s, buf, sizeof(buf)) <= 0) {
51      log("SSH: error receiving identification string -- %s\n", STRERROR);      log("SSH: error receiving identification string -- %s\n", STRERROR);
52      return FALSE;      return FALSE;
53    }    }
# Line 60  int check_ssh(Port_T p) { Line 60  int check_ssh(Port_T p) {
60    }    }
61    
62    /* send identification string back to server */    /* send identification string back to server */
63    if(port_send(p, buf, strlen(buf), 0) <= 0) {    if(socket_write(s, buf, strlen(buf)) <= 0) {
64      log("SSH: error sending identification string -- %s\n", STRERROR);      log("SSH: error sending identification string -- %s\n", STRERROR);
65      return FALSE;      return FALSE;
66    }    }
67        
68    return TRUE;    return TRUE;
69      
70  }  }

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

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