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 mpmt.c
Date Fri, 07 Jul 2000 18:44:50 GMT
rbb         00/07/07 11:44:50

  Modified:    src/modules/mpm/mpmt mpmt.c
  Log:
  Fix some formatting issues.
  
  Revision  Changes    Path
  1.2       +17 -9     apache-2.0/src/modules/mpm/mpmt/mpmt.c
  
  Index: mpmt.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt/mpmt.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- mpmt.c	2000/07/07 17:35:43	1.1
  +++ mpmt.c	2000/07/07 18:44:50	1.2
  @@ -707,7 +707,8 @@
           if (workers_may_exit) {
               pthread_mutex_unlock(&thread_accept_mutex);
               break;
  -        }                                                                             
 if ((rv = SAFE_ACCEPT(ap_lock(process_accept_mutex)))
  +        }
  +        if ((rv = SAFE_ACCEPT(ap_lock(process_accept_mutex)))
               != APR_SUCCESS) {
               ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf,
                            "ap_lock failed. Attempting to shutdown "
  @@ -727,7 +728,8 @@
                   /* ap_poll() will only return errors in catastrophic
                    * circumstances. Let's try exiting gracefully, for now. */
                   ap_log_error(APLOG_MARK, APLOG_ERR, srv, (const server_rec *)
  -                             ap_server_conf, "ap_poll: (listen)");                    
         workers_may_exit = 1;
  +                             ap_server_conf, "ap_poll: (listen)");
  +                workers_may_exit = 1;
               }
               if (workers_may_exit) break;
   
  @@ -747,7 +749,8 @@
                   /* find a listener */
                   curr_pollfd = last_pollfd;
                   do {
  -                    curr_pollfd++;                                                    
             if (curr_pollfd > num_listensocks) {
  +                    curr_pollfd++;
  +                    if (curr_pollfd > num_listensocks) {
                           curr_pollfd = 1;
                       }
                       /* XXX: Should we check for POLLERR? */
  @@ -766,7 +769,8 @@
                   ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf, "ap_accept");
               }
               if ((rv = SAFE_ACCEPT(ap_unlock(process_accept_mutex)))
  -                != APR_SUCCESS) {                                                     
         ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf,
  +                != APR_SUCCESS) {
  +                ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf,
                                "ap_unlock failed. Attempting to shutdown "
                                "process gracefully.");
                   workers_may_exit = 1;
  @@ -782,10 +786,12 @@
                   }
               }
               pthread_mutex_unlock(&idle_thread_count_mutex);
  -            process_socket(ptrans, csd, conn_id);                                     
     requests_this_child--;
  +            process_socket(ptrans, csd, conn_id);
  +            requests_this_child--;
           } else {
               if ((rv = SAFE_ACCEPT(ap_unlock(process_accept_mutex)))
  -                != APR_SUCCESS) {                                                     
         ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf,
  +                != APR_SUCCESS) {
  +                ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf,
                                "ap_unlock failed. Attempting to shutdown "
                                "process gracefully.");
                   workers_may_exit = 1;
  @@ -805,7 +811,8 @@
       pthread_mutex_lock(&worker_thread_count_mutex);
       worker_thread_count--;
       worker_thread_free_ids[worker_thread_count] = thread_num;
  -    if (worker_thread_count == 0) {                                                   
 /* All the threads have exited, now finish the shutdown process
  +    if (worker_thread_count == 0) {
  +        /* All the threads have exited, now finish the shutdown process
            * by signalling the sigwait thread */
           kill(ap_my_pid, SIGTERM);
       }
  @@ -1847,7 +1854,8 @@
   static const char *set_max_threads(cmd_parms *cmd, void *dummy, const char *arg)
   {
       const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
  -    if (err != NULL) {                                                                
 return err;
  +    if (err != NULL) {
  +        return err;
       }
   
       max_threads = atoi(arg);
  @@ -1914,7 +1922,7 @@
     "Maximum number of children alive at the same time"),
   #ifdef DEXTER
   AP_INIT_TAKE1("MaxThreadsPerChild", set_max_threads, NULL, RSRC_CONF,
  -              "Maximum number of threads per child"),                           
  +              "Maximum number of threads per child"), 
   #else
   AP_INIT_TAKE1("ThreadsPerChild", set_threads_per_child, NULL, RSRC_CONF,
     "Number of threads each child creates"),
  
  
  

Mime
View raw message