httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dr...@locus.apache.org
Subject cvs commit: apache-2.0/src/modules/mpm/mpmt_beos mpmt_beos.c
Date Wed, 14 Jun 2000 00:17:22 GMT
dreid       00/06/13 17:17:22

  Modified:    src/modules/mpm/mpmt_beos mpmt_beos.c
  Log:
  Tidy up the beos mpm by
  - removing some unused variables
  - correct a problem with pool allocations that killed the server
  - add back the ap_lingering close call which I removed in error
    just before going on holiday.
  
  Revision  Changes    Path
  1.33      +9 -13     apache-2.0/src/modules/mpm/mpmt_beos/mpmt_beos.c
  
  Index: mpmt_beos.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_beos/mpmt_beos.c,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- mpmt_beos.c	2000/06/12 18:07:36	1.32
  +++ mpmt_beos.c	2000/06/14 00:17:21	1.33
  @@ -77,6 +77,7 @@
   #include "poll.h"
   #include "mpm_common.h"
   #include "mpm.h"
  +#include <unistd.h>
   
   /*
    * Actual definitions of config globals
  @@ -392,6 +393,7 @@
                                            conn_id);
   
       ap_process_connection(current_conn);
  +    ap_lingering_close(current_conn);
   }
   
   static int32 worker_thread(void * dummy)
  @@ -400,13 +402,11 @@
       int process_slot = ti->pid;
       int thread_slot = ti->tid;
       ap_pool_t *tpool = ti->tpool;
  -    struct sockaddr sa_client;
       ap_socket_t *csd = NULL;
       ap_pool_t *ptrans;		/* Pool for per-transaction stuff */
       ap_socket_t *sd = NULL;
       int srv;
       int curr_pollfd, last_pollfd = 0;
  -    int thesock;
       sigset_t sig_mask;
       
       free(ti);
  @@ -501,7 +501,6 @@
       thread_id thread;
       int i;
       int my_child_num = child_num_arg;
  -    proc_info *my_info = NULL;
       ap_listen_rec *lr;
       struct sigaction sa;
       int32 msg;
  @@ -544,7 +543,7 @@
       }
   
       for (i=0; i < ap_threads_per_child; i++) {
  -        my_info = (proc_info *)malloc(sizeof(proc_info));
  +        proc_info *my_info = (proc_info *)malloc(sizeof(proc_info));
           if (my_info == NULL) {
               ap_log_error(APLOG_MARK, APLOG_ALERT, errno, ap_server_conf,
   		         "malloc: out of memory");
  @@ -554,9 +553,8 @@
           my_info->tid = i;
           my_info->sd = 0;
           ap_create_pool(&my_info->tpool, pchild);
  -	
  -        /* We are creating threads right now */
   
  +        /* We are creating threads right now */
           if ((thread = spawn_thread(worker_thread, "httpd_worker_thread",
   	      B_NORMAL_PRIORITY, my_info)) < B_NO_ERROR) {
               ap_log_error(APLOG_MARK, APLOG_ALERT, errno, ap_server_conf,
  @@ -648,13 +646,11 @@
   
   static void perform_idle_server_maintenance(void)
   {
  -    int i, j;
  -    int idle_thread_count;
  +    int i;
       time_t now = 0;
       int free_length;
       int free_slots[MAX_SPAWN_RATE];
       int last_non_dead;
  -    int total_non_dead;
   
       /* initialize the free_list */
       free_length = 0;
  @@ -741,7 +737,7 @@
   		    * child.
   		    */
   		ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, errno, ap_server_conf,
  -			    "long lost child came home! (pid %d)", pid.pid);
  +			    "long lost child came home! (pid %ld)", pid.pid);
   	    }
   	    /* Don't perform idle maintenance when a child dies,
                * only do it when there's a timeout.  Remember only a
  @@ -871,8 +867,8 @@
       }
   
       if (is_graceful) {
  -	int i, j;
  -        char char_of_death = '!';
  +	int i;
  +    char char_of_death = '!';
   
   	ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, errno, ap_server_conf,
   		    "SIGWINCH received.  Doing graceful restart");
  @@ -1098,7 +1094,7 @@
   
   static const char *set_coredumpdir (cmd_parms *cmd, void *dummy, char *arg) 
   {
  -    ap_file_t finfo;
  +    ap_finfo_t finfo;
       const char *fname;
       const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
       if (err != NULL) {
  
  
  

Mime
View raw message