httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stodd...@apache.org
Subject cvs commit: httpd-2.0/server/mpm/winnt mpm_winnt.c mpm_winnt.h
Date Mon, 01 Apr 2002 18:55:46 GMT
stoddard    02/04/01 10:55:46

  Modified:    server/mpm/winnt mpm_winnt.c mpm_winnt.h
  Log:
  Win32: Move apr_bucket_alloc() to a more reasonable location to fix memory leak.
  
  Revision  Changes    Path
  1.253     +4 -6      httpd-2.0/server/mpm/winnt/mpm_winnt.c
  
  Index: mpm_winnt.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/winnt/mpm_winnt.c,v
  retrieving revision 1.252
  retrieving revision 1.253
  diff -u -r1.252 -r1.253
  --- mpm_winnt.c	29 Mar 2002 08:17:26 -0000	1.252
  +++ mpm_winnt.c	1 Apr 2002 18:55:45 -0000	1.253
  @@ -266,6 +266,7 @@
               return NULL;
           }
           pCompContext->accept_socket = INVALID_SOCKET;
  +        pCompContext->ba = apr_bucket_alloc_create(pchild);
           num_completion_contexts++;
       }
       return pCompContext;
  @@ -839,8 +840,9 @@
       if (context == NULL) {
           /* allocate the completion context and the transaction pool */
           context = apr_pcalloc(pconf, sizeof(COMP_CONTEXT));
  -        apr_pool_create(&context->ptrans, pconf);
  +        apr_pool_create(&context->ptrans, pchild);
           apr_pool_tag(context->ptrans, "ptrans");
  +        context->ba = apr_bucket_alloc_create(pchild);
       }
       
   
  @@ -1052,7 +1054,6 @@
   {
       static int requests_this_child = 0;
       PCOMP_CONTEXT context = NULL;
  -    apr_bucket_alloc_t *bucket_alloc;
       apr_os_sock_info_t sockinfo;
       ap_sb_handle_t *sbh;
   
  @@ -1076,9 +1077,6 @@
               break;
           }
   
  -        /* XXX: where does this go? */
  -        bucket_alloc = apr_bucket_alloc_create(context->ptrans);
  -
           /* Have we hit MaxRequestPerChild connections? */
           if (ap_max_requests_per_child) {
               requests_this_child++;
  @@ -1098,7 +1096,7 @@
           ap_create_sb_handle(&sbh, context->ptrans, 0, thread_num);
           c = ap_run_create_connection(context->ptrans, ap_server_conf,
                                        context->sock, thread_num, sbh,
  -                                     bucket_alloc);
  +                                     context->ba);
   
           if (c) {
               ap_process_connection(c, context->sock);
  
  
  
  1.36      +1 -0      httpd-2.0/server/mpm/winnt/mpm_winnt.h
  
  Index: mpm_winnt.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/winnt/mpm_winnt.h,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- mpm_winnt.h	22 Mar 2002 01:28:01 -0000	1.35
  +++ mpm_winnt.h	1 Apr 2002 18:55:46 -0000	1.36
  @@ -199,6 +199,7 @@
       struct sockaddr *sa_client;
       int sa_client_len;
       apr_pool_t *ptrans;
  +    apr_bucket_alloc_t *ba;
   } COMP_CONTEXT, *PCOMP_CONTEXT;
   
   typedef enum {
  
  
  

Mime
View raw message