httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@locus.apache.org
Subject cvs commit: apache-2.0/src/modules/mpm/spmt_os2 spmt_os2.c
Date Mon, 10 Jul 2000 23:12:12 GMT
rbb         00/07/10 16:12:11

  Modified:    src/modules/mpm/spmt_os2 spmt_os2.c
  Log:
  Make the spmt_os2 MPM use the new setup_listeners API.  This should work,
  but I make no garauntees.
  
  Revision  Changes    Path
  1.53      +10 -8     apache-2.0/src/modules/mpm/spmt_os2/spmt_os2.c
  
  Index: spmt_os2.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/spmt_os2/spmt_os2.c,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- spmt_os2.c	2000/07/10 22:08:11	1.52
  +++ spmt_os2.c	2000/07/10 23:12:10	1.53
  @@ -727,6 +727,7 @@
       ap_pollfd_t *listen_poll;
       ap_socket_t *csd = NULL;
       int nsds, rv;
  +    int num_listensocks;
   
       /* Disable the restart signal handlers and enable the just_die stuff.
        * Note that since restart() just notes that a restart has been
  @@ -748,8 +749,15 @@
       THREAD_GLOBAL(pchild) = pchild;
       ap_create_pool(&ptrans, pchild);
   
  -    if (ap_setup_listeners(pchild, &listen_poll)) {
  -	clean_child_exit(1);
  +    if ((num_listensocks = ap_setup_listeners(s)) < 1) {
  +	ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ALERT, 0, s,
  +		    "no listening sockets available, shutting down");
  +	return -1;
  +    }
  +
  +    ap_setup_poll(&listen_poll, num_listensocks+1, pchild);
  +    for (lr = ap_listeners; lr; lr = lr->next) {
  +        ap_add_poll_socket(*listen_poll, lr->sd, APR_POLLIN);
       }
   
       /* needs to be done before we switch UIDs so we have permissions */
  @@ -1166,12 +1174,6 @@
       pconf = _pconf;
       server_conf = s;
       ap_log_pid(pconf, ap_pid_fname);
  -
  -    if ((status = ap_listen_open(s->process, s->port)) != APR_SUCCESS) {
  -	ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ALERT, status, s,
  -		    "no listening sockets available, shutting down");
  -	return -1;
  -    }
   
       SAFE_ACCEPT(accept_mutex_init(pconf));
   
  
  
  

Mime
View raw message