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

Diff of /monit/socket.c

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

revision 1.49 by hauk, Thu Oct 20 23:08:58 2005 UTC revision 1.50 by hauk, Sat Oct 29 15:36:59 2005 UTC
# Line 462  int socket_write(Socket_T S, void *b, in Line 462  int socket_write(Socket_T S, void *b, in
462    while(size > 0) {    while(size > 0) {
463            
464      if(S->ssl) {      if(S->ssl) {
465        n= send_ssl_socket(S->ssl, p, size);        n= send_ssl_socket(S->ssl, p, size, S->timeout);
466      } else {      } else {
467        n= sock_write(S->socket,  p, size);        if(S->type==SOCK_DGRAM)
468            n= udp_write(S->socket,  p, size, S->timeout);
469          else
470            n= sock_write(S->socket,  p, size, S->timeout);
471      }      }
472            
473      if(n <= 0) break;      if(n <= 0) break;
# Line 608  static int fill(Socket_T S) { Line 611  static int fill(Socket_T S) {
611      }      }
612            
613      if(n==0) break;      if(n==0) break;
614                
615      if(n < 0) {      if(n < 0) {
616        if(errno == EAGAIN || errno == EWOULDBLOCK) break;        if(errno == EAGAIN || errno == EWOULDBLOCK || S->type==SOCK_DGRAM) break;
617        return -1;        return -1;
618      }      }
619            

Legend:
Removed from v.1.49  
changed lines
  Added in v.1.50

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