httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@locus.apache.org
Subject cvs commit: apache-2.0/src/modules/mpm/mpmt_pthread mpmt_pthread.c
Date Thu, 27 Jul 2000 23:05:45 GMT
trawick     00/07/27 16:05:45

  Modified:    src/modules/mpm/dexter dexter.c
               src/modules/mpm/mpmt_pthread mpmt_pthread.c
  Log:
  Don't try to process a connection when accept() failed.
  
  Revision  Changes    Path
  1.115     +5 -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.114
  retrieving revision 1.115
  diff -u -r1.114 -r1.115
  --- dexter.c	2000/07/21 19:50:51	1.114
  +++ dexter.c	2000/07/27 23:05:43	1.115
  @@ -595,6 +595,7 @@
       got_fd:
           if (!workers_may_exit) {
               if ((rv = ap_accept(&csd, sd, ptrans)) != APR_SUCCESS) {
  +                csd = NULL;
                   ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf, "ap_accept");
               }
               if ((rv = SAFE_ACCEPT(ap_unlock(process_accept_mutex)))
  @@ -615,8 +616,10 @@
                   }
               }
               pthread_mutex_unlock(&idle_thread_count_mutex);
  -            process_socket(ptrans, csd, conn_id);
  -            requests_this_child--;
  +            if (csd != NULL) {
  +                process_socket(ptrans, csd, conn_id);
  +                requests_this_child--;
  +            }
   	} else {
               if ((rv = SAFE_ACCEPT(ap_unlock(process_accept_mutex)))
                   != APR_SUCCESS) {
  
  
  
  1.112     +5 -2      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.111
  retrieving revision 1.112
  diff -u -r1.111 -r1.112
  --- mpmt_pthread.c	2000/07/25 17:39:20	1.111
  +++ mpmt_pthread.c	2000/07/27 23:05:44	1.112
  @@ -545,6 +545,7 @@
       got_fd:
           if (!workers_may_exit) {
               if ((rv = ap_accept(&csd, sd, ptrans)) != APR_SUCCESS) {
  +                csd = NULL;
                   ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf, 
                                "ap_accept");
               }
  @@ -556,8 +557,10 @@
                   workers_may_exit = 1;
               }
               pthread_mutex_unlock(&thread_accept_mutex);
  -            process_socket(ptrans, csd, process_slot, thread_slot);
  -            requests_this_child--;
  +            if (csd != NULL) {
  +                process_socket(ptrans, csd, process_slot, thread_slot);
  +                requests_this_child--;
  +            }
           }
           else {
               if ((rv = SAFE_ACCEPT(ap_unlock(process_accept_mutex)))
  
  
  

Mime
View raw message