/[monit]/monit/http/engine.c
ViewVC logotype

Diff of /monit/http/engine.c

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

revision 1.25 by hauk, Tue Jul 15 01:02:58 2003 UTC revision 1.26 by hauk, Wed Jul 30 01:27:15 2003 UTC
# Line 74  static RequestWrapper create_wrapper(str Line 74  static RequestWrapper create_wrapper(str
74  static void destroy_host_allow(HostsAllow);  static void destroy_host_allow(HostsAllow);
75    
76  /**  /**
77   *  A http 1.0 server. The server delegates handling of a HTTP request   *  A naive http 1.0 server. The server delegates handling of a HTTP
78   *  and response to the processor module.   *  request and response to the processor module.
79   *   *
80   *  NOTE   *  NOTE
81   *    This server does not use threads or forks; Requests are   *    This server does not use threads or forks; Requests are
# Line 426  static RequestWrapper socket_producer(in Line 426  static RequestWrapper socket_producer(in
426    
427    again:    again:
428    errno= 0;    errno= 0;
429    if ( (client= accept(server, (struct sockaddr*)&in, &len)) < 0) {    if((client= accept(server, (struct sockaddr*)&in, &len)) < 0) {
430            
431      if ( stopped ) {      if(stopped) {
         
432        log("http server: service stopped\n");        log("http server: service stopped\n");
433              } else if(errno == EINTR) {
     } else if ( errno == EINTR ) {  
         
434        goto again;        goto again;
         
435      } else {      } else {
         
436        log("http server: cannot accept connection -- %s\n", STRERROR);        log("http server: cannot accept connection -- %s\n", STRERROR);
         
437      }      }
438            
439      return NULL;      return NULL;
440            
441    }    }
442    
443      if(set_noblock(client) < 0) {
444        close_socket(client);
445        return NULL;
446      }
447      
448    return create_wrapper(in.sin_addr, client);    return create_wrapper(in.sin_addr, client);
449    
450  }  }

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26

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