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/mpmt_pthread mpmt_pthread.c
Date Thu, 22 Jun 2000 19:46:28 GMT
rbb         00/06/22 12:46:26

  Modified:    src/modules/mpm/dexter dexter.c
               src/modules/mpm/mpmt_pthread mpmt_pthread.c
  Log:
  Commit a few changes to the mpmt_pthread and dexter MPMs.  These basically
  fix the error checking for one return from ap_poll, and use ap_pcalloc to
  allocate the listenfds array.  By using listenfds, we can avoid making
  an unnecessary call to ap_create_tcp_socket.
  Submitted by:	Jeff Trawick
  Reviewed by:	Ryan Bloom
  
  Revision  Changes    Path
  1.101     +2 -2      apache-2.0/src/modules/mpm/dexter/dexter.c
  
  Index: dexter.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/dexter/dexter.c,v
  retrieving revision 1.100
  retrieving revision 1.101
  diff -u -r1.100 -r1.101
  --- dexter.c	2000/06/22 19:06:07	1.100
  +++ dexter.c	2000/06/22 19:46:19	1.101
  @@ -649,7 +649,7 @@
               srv = ap_poll(pollset, &n, -1);
   
               if (srv != APR_SUCCESS) {
  -                if (errno == APR_EINTR) {
  +                if (ap_canonical_error(srv) == APR_EINTR) {
                       continue;
                   }
   
  @@ -796,7 +796,7 @@
       requests_this_child = max_requests_per_child;
       
       /* Set up the pollfd array */
  -    listenfds = ap_palloc(pchild, sizeof(*listenfds) * (num_listenfds + 1));
  +    listenfds = ap_pcalloc(pchild, sizeof(*listenfds) * (num_listenfds + 1));
       ap_put_os_sock(&listenfds[0], &pipe_of_death[0], pchild);
       for (lr = ap_listeners, i = 1; i <= num_listenfds; lr = lr->next, ++i)
           listenfds[i]=lr->sd;
  
  
  
  1.93      +2 -3      apache-2.0/src/modules/mpm/mpmt_pthread/mpmt_pthread.c
  
  Index: mpmt_pthread.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_pthread/mpmt_pthread.c,v
  retrieving revision 1.92
  retrieving revision 1.93
  diff -u -r1.92 -r1.93
  --- mpmt_pthread.c	2000/06/21 13:15:28	1.92
  +++ mpmt_pthread.c	2000/06/22 19:46:23	1.93
  @@ -596,7 +596,7 @@
   
               ret = ap_poll(pollset, &n, -1);
               if (ret != APR_SUCCESS) {
  -                if (ret == APR_EINTR) {
  +                if (ap_canonical_error(ret) == APR_EINTR) {
                       continue;
                   }
   
  @@ -734,9 +734,8 @@
       requests_this_child = ap_max_requests_per_child;
       
       /* Set up the pollfd array */
  -    listensocks = ap_palloc(pchild,
  +    listensocks = ap_pcalloc(pchild,
   			    sizeof(*listensocks) * (num_listensocks + 1));
  -    ap_create_tcp_socket(&listensocks[0], pchild);
       ap_put_os_sock(&listensocks[0], &pipe_of_death[0], pchild);
       for (lr = ap_listeners, i = 1; i <= num_listensocks; lr = lr->next, ++i)
   	listensocks[i]=lr->sd;
  
  
  

Mime
View raw message