/[monit]/monit/socket.c
ViewVC logotype

Diff of /monit/socket.c

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

revision 1.12 by hauk, Fri Aug 1 01:10:59 2003 UTC revision 1.13 by hauk, Fri Aug 1 21:35:59 2003 UTC
# Line 263  int socket_get_remote_port(Socket_T s) { Line 263  int socket_get_remote_port(Socket_T s) {
263   * @param s A Socket object   * @param s A Socket object
264   * @return The remote hostname   * @return The remote hostname
265   */   */
266  const char *Socket_get_remote_hostname(Socket_T s) {  const char *socket_get_remote_hostname(Socket_T s) {
267      
268    ASSERT(s);    ASSERT(s);
269        
270    return s->host;    return s->host;
# Line 331  int socket_write(Socket_T s, void *b, in Line 331  int socket_write(Socket_T s, void *b, in
331    
332    }    }
333    
334    if(n < 0 && p==b) {    if(n < 0) {
335        /* No write or a partial write is an error */
336      return -1;      return -1;
337    }    }
338        
# Line 359  int socket_read(Socket_T s, void *b, int Line 360  int socket_read(Socket_T s, void *b, int
360      if(s->ssl) {      if(s->ssl) {
361        n= recv_ssl_socket(s->ssl, p, size);        n= recv_ssl_socket(s->ssl, p, size);
362      } else {      } else {
363        n= sock_read(s->socket, p, size, 0);        n= sock_read(s->socket, p, size, 1);
364      }      }
365    
366      if(n <= 0) break;      if(n <= 0) break;

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

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