httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject cvs commit: httpd-2.0/server/mpm/prefork prefork.c
Date Tue, 13 Nov 2001 17:44:07 GMT
rbb         01/11/13 09:44:07

  Modified:    include  http_connection.h
               server   connection.c core.c
               server/mpm/prefork prefork.c
  Log:
  Back out my last patch.  The logic to add sockets to pollsets is back in
  the MPM
  
  Revision  Changes    Path
  1.44      +0 -2      httpd-2.0/include/http_connection.h
  
  Index: http_connection.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/include/http_connection.h,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- http_connection.h	2001/11/13 07:15:36	1.43
  +++ http_connection.h	2001/11/13 17:44:06	1.44
  @@ -143,8 +143,6 @@
   AP_DECLARE_HOOK(conn_rec *, create_connection,
                   (apr_pool_t *p, apr_socket_t *csd, int conn_id))
   
  -AP_DECLARE_HOOK(int, add_listeners, (apr_pollfd_t *pollset, apr_socket_t **listensocks,
int num_listensocks))
  -
   #ifdef __cplusplus
   }
   #endif
  
  
  
  1.92      +0 -4      httpd-2.0/server/connection.c
  
  Index: connection.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/connection.c,v
  retrieving revision 1.91
  retrieving revision 1.92
  diff -u -r1.91 -r1.92
  --- connection.c	2001/11/13 17:03:29	1.91
  +++ connection.c	2001/11/13 17:44:06	1.92
  @@ -76,13 +76,9 @@
   APR_HOOK_STRUCT(
   	    APR_HOOK_LINK(pre_connection)
   	    APR_HOOK_LINK(process_connection)
  -            APR_HOOK_LINK(add_listeners)
               APR_HOOK_LINK(create_connection)
   )
   
  -AP_IMPLEMENT_HOOK_RUN_ALL(int,add_listeners,
  -     (apr_pollfd_t *pollset, apr_socket_t **listensocks, int num_listensocks),
  -     (pollset, listensocks, num_listensocks),OK,DECLINED)
   AP_IMPLEMENT_HOOK_RUN_ALL(int,pre_connection,(conn_rec *c),(c),OK,DECLINED)
   AP_IMPLEMENT_HOOK_RUN_FIRST(int,process_connection,(conn_rec *c),(c),DECLINED)
   AP_IMPLEMENT_HOOK_RUN_FIRST(conn_rec *,create_connection,
  
  
  
  1.93      +0 -14     httpd-2.0/server/core.c
  
  Index: core.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/core.c,v
  retrieving revision 1.92
  retrieving revision 1.93
  diff -u -r1.92 -r1.93
  --- core.c	2001/11/13 07:15:36	1.92
  +++ core.c	2001/11/13 17:44:06	1.93
  @@ -3329,19 +3329,6 @@
       return net->c;
   }
   
  -static int core_add_listeners(apr_pollfd_t *pollset, 
  -                              apr_socket_t **listensocks, int num_listensocks)
  -{
  -    int i;
  -    ap_listen_rec *lr;
  -
  -    for (lr = ap_listeners, i = 0; i < num_listensocks; lr = lr->next, i++) {
  -        listensocks[i] = lr->sd;
  -        apr_poll_socket_add(pollset, listensocks[i], APR_POLLIN);
  -    }
  -    return OK;
  -}
  -
   static void register_hooks(apr_pool_t *p)
   {
       ap_hook_post_config(core_post_config,NULL,NULL,APR_HOOK_REALLY_FIRST);
  @@ -3355,7 +3342,6 @@
       ap_hook_access_checker(do_nothing,NULL,NULL,APR_HOOK_REALLY_LAST);
       ap_hook_create_connection(core_create_conn, NULL, NULL, APR_HOOK_REALLY_LAST);
       ap_hook_create_request(core_create_req, NULL, NULL, APR_HOOK_MIDDLE);
  -    ap_hook_add_listeners(core_add_listeners, NULL, NULL, APR_HOOK_MIDDLE);
       APR_OPTIONAL_HOOK(proxy, create_req, core_create_proxy_req, NULL, NULL, 
                         APR_HOOK_MIDDLE);
       ap_hook_pre_mpm(ap_create_scoreboard, NULL, NULL, APR_HOOK_MIDDLE);
  
  
  
  1.216     +7 -3      httpd-2.0/server/mpm/prefork/prefork.c
  
  Index: prefork.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/prefork/prefork.c,v
  retrieving revision 1.215
  retrieving revision 1.216
  diff -u -r1.215 -r1.216
  --- prefork.c	2001/11/13 07:15:36	1.215
  +++ prefork.c	2001/11/13 17:44:07	1.216
  @@ -544,7 +544,8 @@
       apr_pool_t *ptrans;
       conn_rec *current_conn;
       apr_status_t stat = APR_EINIT;
  -    int sockdes;
  +    int sockdes, i;
  +    ap_listen_rec *lr;
       int curr_pollfd, last_pollfd = 0;
       apr_pollfd_t *pollset;
       apr_socket_t *sd;
  @@ -575,12 +576,15 @@
   
       ap_sync_scoreboard_image();
   
  -    apr_poll_setup(&pollset, num_listensocks, pchild);
       /* Set up the pollfd array */
       listensocks = apr_pcalloc(pchild,
                               sizeof(*listensocks) * (num_listensocks));
  +    for (lr = ap_listeners, i = 0; i < num_listensocks; lr = lr->next, i++)
  +        listensocks[i]=lr->sd;
   
  -    ap_run_add_listeners(pollset, listensocks, num_listensocks);
  +    apr_poll_setup(&pollset, num_listensocks, pchild);
  +    for (i = 0; i < num_listensocks; i++)
  +        apr_poll_socket_add(pollset, listensocks[i], APR_POLLIN);
   
       while (!die_now) {
   	/*
  
  
  

Mime
View raw message