You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2011/09/23 15:39:35 UTC

svn commit: r1174751 [4/4] - in /httpd/httpd/trunk: modules/aaa/ modules/arch/netware/ modules/arch/unix/ modules/arch/win32/ modules/cache/ modules/cluster/ modules/core/ modules/dav/fs/ modules/dav/main/ modules/echo/ modules/examples/ modules/experi...

Modified: httpd/httpd/trunk/server/log.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/log.c?rev=1174751&r1=1174750&r2=1174751&view=diff
==============================================================================
--- httpd/httpd/trunk/server/log.c (original)
+++ httpd/httpd/trunk/server/log.c Fri Sep 23 13:39:32 2011
@@ -173,9 +173,9 @@ typedef struct read_handle_t {
 static read_handle_t *read_handles;
 
 /**
- * @brief The piped logging structure.  
+ * @brief The piped logging structure.
  *
- * Piped logs are used to move functionality out of the main server.  
+ * Piped logs are used to move functionality out of the main server.
  * For example, log rotation is done with piped logs.
  */
 struct piped_log {
@@ -209,7 +209,7 @@ AP_DECLARE(apr_file_t *) ap_piped_log_wr
  * take the parent process's child procs.
  * If the win32 parent instead passed each and every
  * logger write handle from itself down to the child,
- * and the parent manages all aspects of keeping the 
+ * and the parent manages all aspects of keeping the
  * reliable pipe log children alive, this would still
  * make no sense :)  Cripple it on Win32.
  */
@@ -266,18 +266,18 @@ AP_DECLARE(apr_status_t) ap_replace_stde
          */
         stderr_pool = p;
     }
-    if ((rc = apr_file_open_stderr(&stderr_log, stderr_pool)) 
+    if ((rc = apr_file_open_stderr(&stderr_log, stderr_pool))
             == APR_SUCCESS) {
         apr_file_flush(stderr_log);
-        if ((rc = apr_file_dup2(stderr_log, stderr_file, stderr_pool)) 
+        if ((rc = apr_file_dup2(stderr_log, stderr_file, stderr_pool))
                 == APR_SUCCESS) {
             apr_file_close(stderr_file);
             /*
              * You might ponder why stderr_pool should survive?
              * The trouble is, stderr_pool may have s_main->error_log,
              * so we aren't in a position to destory stderr_pool until
-             * the next recycle.  There's also an apparent bug which 
-             * is not; if some folk decided to call this function before 
+             * the next recycle.  There's also an apparent bug which
+             * is not; if some folk decided to call this function before
              * the core open error logs hook, this pool won't survive.
              * Neither does the stderr logger, so this isn't a problem.
              */
@@ -328,7 +328,7 @@ static int log_child(apr_pool_t *p, cons
                                       APR_NO_PIPE,
                                       APR_NO_PIPE)) == APR_SUCCESS)
         && ((rc = apr_procattr_error_check_set(procattr, 1)) == APR_SUCCESS)
-        && ((rc = apr_procattr_child_errfn_set(procattr, log_child_errfn)) 
+        && ((rc = apr_procattr_child_errfn_set(procattr, log_child_errfn))
                 == APR_SUCCESS)) {
         char **args;
         const char *pname;
@@ -371,7 +371,7 @@ static int open_error_log(server_rec *s,
 
         /* In 2.4 favor PROGRAM_ENV, accept "||prog" syntax for compatibility
          * and "|$cmd" to override the default.
-         * Any 2.2 backport would continue to favor SHELLCMD_ENV so there 
+         * Any 2.2 backport would continue to favor SHELLCMD_ENV so there
          * accept "||prog" to override, and "|$cmd" to ease conversion.
          */
         if (*fname == '|')
@@ -450,17 +450,17 @@ int ap_open_logs(apr_pool_t *pconf, apr_
     /* Register to throw away the read_handles list when we
      * cleanup plog.  Upon fork() for the apache children,
      * this read_handles list is closed so only the parent
-     * can relaunch a lost log child.  These read handles 
+     * can relaunch a lost log child.  These read handles
      * are always closed on exec.
-     * We won't care what happens to our stderr log child 
-     * between log phases, so we don't mind losing stderr's 
+     * We won't care what happens to our stderr log child
+     * between log phases, so we don't mind losing stderr's
      * read_handle a little bit early.
      */
     apr_pool_cleanup_register(p, &read_handles, ap_pool_cleanup_set_null,
                               apr_pool_cleanup_null);
 
     /* HERE we need a stdout log that outlives plog.
-     * We *presume* the parent of plog is a process 
+     * We *presume* the parent of plog is a process
      * or global pool which spans server restarts.
      * Create our stderr_pool as a child of the plog's
      * parent pool.
@@ -1356,7 +1356,7 @@ AP_DECLARE(void) ap_log_command_line(apr
     process_rec *process = s->process;
     char *result;
     int len_needed = 0;
-    
+
     /* Piece together the command line from the pieces
      * in process->argv, with spaces in between.
      */
@@ -1721,7 +1721,7 @@ AP_DECLARE(piped_log *) ap_open_piped_lo
 
     /* In 2.4 favor PROGRAM_ENV, accept "||prog" syntax for compatibility
      * and "|$cmd" to override the default.
-     * Any 2.2 backport would continue to favor SHELLCMD_ENV so there 
+     * Any 2.2 backport would continue to favor SHELLCMD_ENV so there
      * accept "||prog" to override, and "|$cmd" to ease conversion.
      */
     if (*program == '|')

Modified: httpd/httpd/trunk/server/main.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/main.c?rev=1174751&r1=1174750&r2=1174751&view=diff
==============================================================================
--- httpd/httpd/trunk/server/main.c (original)
+++ httpd/httpd/trunk/server/main.c Fri Sep 23 13:39:32 2011
@@ -298,7 +298,7 @@ static process_rec *init_process(int *ar
         char ctimebuff[APR_CTIME_LEN];
         apr_ctime(ctimebuff, apr_time_now());
         fprintf(stderr, "[%s] [crit] (%d) %s: %s failed "
-                        "to initial context, exiting\n", 
+                        "to initial context, exiting\n",
                         ctimebuff, stat, (*argv)[0], failed);
         apr_terminate();
         exit(1);

Modified: httpd/httpd/trunk/server/mpm/event/event.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/event/event.c?rev=1174751&r1=1174750&r2=1174751&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/event/event.c (original)
+++ httpd/httpd/trunk/server/mpm/event/event.c Fri Sep 23 13:39:32 2011
@@ -1485,7 +1485,7 @@ static void * APR_THREAD_FUNC listener_t
                                  "in this process");
                 }
                 else if (apr_atomic_read32(&connection_count) > threads_per_child
-                         + ap_queue_info_get_idlers(worker_queue_info) * 
+                         + ap_queue_info_get_idlers(worker_queue_info) *
                            worker_factor / WORKER_FACTOR_SCALE)
                 {
                     if (!listeners_disabled)

Modified: httpd/httpd/trunk/server/mpm/event/fdqueue.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/event/fdqueue.c?rev=1174751&r1=1174750&r2=1174751&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/event/fdqueue.c (original)
+++ httpd/httpd/trunk/server/mpm/event/fdqueue.c Fri Sep 23 13:39:32 2011
@@ -397,21 +397,21 @@ apr_status_t ap_queue_push(fd_queue_t * 
 apr_status_t ap_queue_push_timer(fd_queue_t * queue, timer_event_t *te)
 {
     apr_status_t rv;
-    
+
     if ((rv = apr_thread_mutex_lock(queue->one_big_mutex)) != APR_SUCCESS) {
         return rv;
     }
-    
+
     AP_DEBUG_ASSERT(!queue->terminated);
 
     APR_RING_INSERT_TAIL(&queue->timers, te, timer_event_t, link);
 
     apr_thread_cond_signal(queue->not_empty);
-    
+
     if ((rv = apr_thread_mutex_unlock(queue->one_big_mutex)) != APR_SUCCESS) {
         return rv;
     }
-    
+
     return APR_SUCCESS;
 }
 
@@ -472,7 +472,7 @@ apr_status_t ap_queue_pop_something(fd_q
         elem->p = NULL;
 #endif /* AP_DEBUG */
     }
-    
+
     rv = apr_thread_mutex_unlock(queue->one_big_mutex);
     return rv;
 }

Modified: httpd/httpd/trunk/server/mpm/prefork/prefork.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/prefork/prefork.c?rev=1174751&r1=1174750&r2=1174751&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/prefork/prefork.c (original)
+++ httpd/httpd/trunk/server/mpm/prefork/prefork.c Fri Sep 23 13:39:32 2011
@@ -517,7 +517,7 @@ static void child_main(int child_num_arg
     osthd = apr_os_thread_current();
     apr_os_thread_put(&thd, &osthd, pchild);
 #endif
-    
+
     apr_pool_create(&ptrans, pchild);
     apr_pool_tag(ptrans, "transaction");
 
@@ -625,7 +625,7 @@ static void child_main(int child_num_arg
                 /* timeout == 10 seconds to avoid a hang at graceful restart/stop
                  * caused by the closing of sockets by the signal handler
                  */
-                status = apr_pollset_poll(pollset, apr_time_from_sec(10), 
+                status = apr_pollset_poll(pollset, apr_time_from_sec(10),
                                           &numdesc, &pdesc);
                 if (status != APR_SUCCESS) {
                     if (APR_STATUS_IS_TIMEUP(status) ||

Modified: httpd/httpd/trunk/server/mpm/simple/simple_children.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/simple/simple_children.c?rev=1174751&r1=1174750&r2=1174751&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/simple/simple_children.c (original)
+++ httpd/httpd/trunk/server/mpm/simple/simple_children.c Fri Sep 23 13:39:32 2011
@@ -39,11 +39,11 @@ static void simple_kill_random_child(sim
         apr_thread_mutex_lock(sc->mtx);
         hi = apr_hash_first(sc->pool, sc->children);
         if (hi != NULL) {
-            apr_hash_this(hi, NULL, NULL, (void **)&child); 
+            apr_hash_this(hi, NULL, NULL, (void **)&child);
             apr_hash_set(sc->children, &child->pid, sizeof(child->pid), NULL);
         }
         apr_thread_mutex_unlock(sc->mtx);
-        
+
         if (child != NULL) {
             kill(child->pid, 9);
             /* TODO: recycle child object */
@@ -62,14 +62,14 @@ static int simple_spawn_child(simple_cor
 {
     pid_t pid = 0;
     int rv = 0;
-    /* Although we could cut this off 'earlier', and not even invoke this 
+    /* Although we could cut this off 'earlier', and not even invoke this
      * function, I would like to keep the functions invoked when in debug mode
      * to be as close as possible to those when not in debug... So, we just skip
      * the actual spawn itself, but go through all of the motions...
      */
     if (!sc->run_single_process) {
         if (sc->spawn_via == SIMPLE_SPAWN_FORK) {
-            
+
             pid = fork();
             if (pid == -1) {
                 rv = errno;
@@ -77,10 +77,10 @@ static int simple_spawn_child(simple_cor
                              "simple_spawn_child: Unable to fork new process");
                 return rv;
             }
-            
+
             if (pid == 0) {
                 /* this is the child process */
-                
+
                 rv = simple_child_loop(sc);
 
                 if (rv) {
@@ -108,7 +108,7 @@ static int simple_spawn_child(simple_cor
 
         apr_thread_mutex_unlock(sc->mtx);
     }
-    
+
     return 0;
 }
 
@@ -125,7 +125,7 @@ void simple_check_children_size(simple_c
 
     if (sc->run_single_process && sc->restart_num == 2) {
         static int run = 0;
-        /* This is kinda of hack, but rather than spawning a child process, 
+        /* This is kinda of hack, but rather than spawning a child process,
          * we register the normal IO handlers in the main event loop....
          */
         if (run == 0) {

Modified: httpd/httpd/trunk/server/mpm/simple/simple_core.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/simple/simple_core.c?rev=1174751&r1=1174750&r2=1174751&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/simple/simple_core.c (original)
+++ httpd/httpd/trunk/server/mpm/simple/simple_core.c Fri Sep 23 13:39:32 2011
@@ -43,7 +43,7 @@ apr_status_t simple_core_init_once(void)
     if (g_simple_core) {
         return APR_SUCCESS;
     }
-    
+
     sc = g_simple_core = ap_retained_data_create(userdata_key, sizeof(*g_simple_core));
 
     apr_pool_create(&sc->pool, ap_pglobal);

Modified: httpd/httpd/trunk/server/mpm/simple/simple_io.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/simple/simple_io.c?rev=1174751&r1=1174750&r2=1174751&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/simple/simple_io.c (original)
+++ httpd/httpd/trunk/server/mpm/simple/simple_io.c Fri Sep 23 13:39:32 2011
@@ -260,10 +260,10 @@ apr_status_t simple_io_accept(simple_cor
     rv = apr_socket_accept(&socket, lr->sd, ptrans);
     if (rv) {
         /* pqXXXXXX: unixd.c has _tons_ of custom handling on return values
-         * from accept, but it seems really crazy, it either worked, or didn't, 
-         * but taking this approach of swallowing the error it is possible we have a 
-         * fatal error on our listening socket, but we don't notice.  
-         * 
+         * from accept, but it seems really crazy, it either worked, or didn't,
+         * but taking this approach of swallowing the error it is possible we have a
+         * fatal error on our listening socket, but we don't notice.
+         *
          * Need to discuss this on dev@
          */
         ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,

Modified: httpd/httpd/trunk/server/mpm/simple/simple_run.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/simple/simple_run.c?rev=1174751&r1=1174750&r2=1174751&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/simple/simple_run.c (original)
+++ httpd/httpd/trunk/server/mpm/simple/simple_run.c Fri Sep 23 13:39:32 2011
@@ -286,7 +286,7 @@ int simple_child_loop(simple_core_t * sc
     }
 
     /* XXXXX: Hack. Reseting parts of the simple core needs to be more
-     * thought out than this. 
+     * thought out than this.
      */
     APR_RING_INIT(&sc->timer_ring, simple_timer_t, link);
 
@@ -323,7 +323,7 @@ int simple_main_loop(simple_core_t * sc)
     if (rv) {
         return rv;
     }
-    
+
     rv = simple_setup_workers(sc);
     if (rv) {
         ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,

Modified: httpd/httpd/trunk/server/mpm/winnt/child.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/winnt/child.c?rev=1174751&r1=1174750&r2=1174751&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/winnt/child.c (original)
+++ httpd/httpd/trunk/server/mpm/winnt/child.c Fri Sep 23 13:39:32 2011
@@ -45,7 +45,7 @@
 
 #ifdef __MINGW32__
 #include <mswsock.h>
-#endif 
+#endif
 
 /*
  * The Windows MPM uses a queue of completion contexts that it passes
@@ -227,7 +227,7 @@ static winnt_conn_ctx_t *mpm_get_complet
                 /* Create the transaction pool */
                 apr_allocator_create(&allocator);
                 apr_allocator_max_free_set(allocator, ap_max_mem_free);
-                rv = apr_pool_create_ex(&context->ptrans, pchild, NULL, 
+                rv = apr_pool_create_ex(&context->ptrans, pchild, NULL,
                                         allocator);
                 if (rv != APR_SUCCESS) {
                     ap_log_error(APLOG_MARK, APLOG_WARNING, rv, ap_server_conf,
@@ -305,7 +305,7 @@ static unsigned int __stdcall winnt_acce
     else {
         accf = 0;
         accf_name = "none";
-        ap_log_error(APLOG_MARK, APLOG_WARNING, apr_get_netos_error(), 
+        ap_log_error(APLOG_MARK, APLOG_WARNING, apr_get_netos_error(),
                      ap_server_conf,
                      "winnt_accept: unrecognized AcceptFilter '%s', "
                      "only 'data', 'connect' or 'none' are valid. "
@@ -316,7 +316,7 @@ static unsigned int __stdcall winnt_acce
 
 #if APR_HAVE_IPV6
     if (getsockname(nlsd, (struct sockaddr *)&ss_listen, &namelen) == SOCKET_ERROR) {
-        ap_log_error(APLOG_MARK, APLOG_ERR, apr_get_netos_error(), 
+        ap_log_error(APLOG_MARK, APLOG_ERR, apr_get_netos_error(),
                      ap_server_conf,
                      "winnt_accept: getsockname error on listening socket, "
                      "is IPv6 available?");
@@ -386,13 +386,13 @@ reinit: /* target of data or connect upo
             /* Create and initialize the accept socket */
 #if APR_HAVE_IPV6
             if (context->accept_socket == INVALID_SOCKET) {
-                context->accept_socket = socket(ss_listen.ss_family, SOCK_STREAM, 
+                context->accept_socket = socket(ss_listen.ss_family, SOCK_STREAM,
                                                 IPPROTO_TCP);
                 context->socket_family = ss_listen.ss_family;
             }
             else if (context->socket_family != ss_listen.ss_family) {
                 closesocket(context->accept_socket);
-                context->accept_socket = socket(ss_listen.ss_family, SOCK_STREAM, 
+                context->accept_socket = socket(ss_listen.ss_family, SOCK_STREAM,
                                                 IPPROTO_TCP);
                 context->socket_family = ss_listen.ss_family;
             }
@@ -402,7 +402,7 @@ reinit: /* target of data or connect upo
 #endif
 
             if (context->accept_socket == INVALID_SOCKET) {
-                ap_log_error(APLOG_MARK, APLOG_WARNING, apr_get_netos_error(), 
+                ap_log_error(APLOG_MARK, APLOG_WARNING, apr_get_netos_error(),
                              ap_server_conf,
                              "winnt_accept: Failed to allocate an accept socket. "
                              "Temporary resource constraint? Try again.");
@@ -444,7 +444,7 @@ reinit: /* target of data or connect upo
                     /* We can get here when:
                      * 1) TransmitFile does not properly recycle the accept socket (typically
                      *    because the client disconnected)
-                     * 2) there is VPN or Firewall software installed with 
+                     * 2) there is VPN or Firewall software installed with
                      *    buggy WSAAccept or WSADuplicateSocket implementation
                      * 3) the dynamic address / adapter has changed
                      * Give five chances, then fall back on AcceptFilter 'none'
@@ -539,14 +539,14 @@ reinit: /* target of data or connect upo
                 /* Not a failure condition. Keep running. */
             }
 
-            /* Get the local & remote address 
+            /* Get the local & remote address
              * TODO; error check
              */
             GetAcceptExSockaddrs(buf, len, PADDED_ADDR_SIZE, PADDED_ADDR_SIZE,
                                  &context->sa_server, &context->sa_server_len,
                                  &context->sa_client, &context->sa_client_len);
 
-            /* For 'data', craft a bucket for our data result 
+            /* For 'data', craft a bucket for our data result
              * and pass to worker_main as context->overlapped.Pointer
              */
             if (accf == 2 && BytesRead)
@@ -580,8 +580,8 @@ reinit: /* target of data or connect upo
 
 
             if (rv != WAIT_OBJECT_0 + 2) {
-                /* not FD_ACCEPT; 
-                 * exit_event triggered or event handle was closed 
+                /* not FD_ACCEPT;
+                 * exit_event triggered or event handle was closed
                  */
                 break;
             }
@@ -624,7 +624,7 @@ reinit: /* target of data or connect upo
                 }
                 break;
             }
-            /* Per MSDN, cancel the inherited association of this socket 
+            /* Per MSDN, cancel the inherited association of this socket
              * to the WSAEventSelect API, and restore the state corresponding
              * to apr_os_sock_make's default assumptions (really, a flaw within
              * os_sock_make and os_sock_put that it does not query).
@@ -640,14 +640,14 @@ reinit: /* target of data or connect upo
         sockinfo.family  = context->sa_server->sa_family;
         sockinfo.type    = SOCK_STREAM;
         /* Restore the state corresponding to apr_os_sock_make's default
-         * assumption of timeout -1 (really, a flaw of os_sock_make and 
+         * assumption of timeout -1 (really, a flaw of os_sock_make and
          * os_sock_put that it does not query to determine ->timeout).
          * XXX: Upon a fix to APR, these three statements should disappear.
          */
         ioctlsocket(context->accept_socket, FIONBIO, &zero);
-        setsockopt(context->accept_socket, SOL_SOCKET, SO_RCVTIMEO, 
+        setsockopt(context->accept_socket, SOL_SOCKET, SO_RCVTIMEO,
                    (char *) &zero, sizeof(zero));
-        setsockopt(context->accept_socket, SOL_SOCKET, SO_SNDTIMEO, 
+        setsockopt(context->accept_socket, SOL_SOCKET, SO_SNDTIMEO,
                    (char *) &zero, sizeof(zero));
         apr_os_sock_make(&context->sock, &sockinfo, context->ptrans);
 
@@ -847,7 +847,7 @@ static DWORD __stdcall worker_main(void 
 }
 
 
-static void cleanup_thread(HANDLE *handles, int *thread_cnt, 
+static void cleanup_thread(HANDLE *handles, int *thread_cnt,
                            int thread_to_clean)
 {
     int i;
@@ -891,7 +891,7 @@ static void create_listener_thread(void)
     for (lr = ap_listeners; lr; lr = lr->next) {
         if (lr->sd != NULL) {
             /* A smaller stack is sufficient.
-             * To convert to CreateThread, the returned handle cannot be 
+             * To convert to CreateThread, the returned handle cannot be
              * ignored, it must be closed/joined.
              */
             _beginthreadex(NULL, 65536, winnt_accept,
@@ -953,11 +953,11 @@ void child_main(apr_pool_t *pconf)
      */
     /* Create the worker thread dispatch IOCP */
     ThreadDispatchIOCP = CreateIoCompletionPort(INVALID_HANDLE_VALUE,
-                                                NULL, 0, 0); 
+                                                NULL, 0, 0);
     apr_thread_mutex_create(&qlock, APR_THREAD_MUTEX_DEFAULT, pchild);
     qwait_event = CreateEvent(NULL, TRUE, FALSE, NULL);
     if (!qwait_event) {
-        ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), 
+        ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(),
                      ap_server_conf,
                      "Child: Failed to create a qwait event.");
         exit(APEXIT_CHILDINIT);
@@ -980,7 +980,7 @@ void child_main(apr_pool_t *pconf)
                 continue;
             }
             ap_update_child_status_from_indexes(0, i, SERVER_STARTING, NULL);
-        
+
             child_handles[i] = CreateThread(NULL, ap_thread_stacksize,
                                             worker_main, (void *) i,
                                             stack_res_flag, &tid);
@@ -996,7 +996,7 @@ void child_main(apr_pool_t *pconf)
                 goto shutdown;
             }
             threads_created++;
-            /* Save the score board index in ht keyed to the thread handle. 
+            /* Save the score board index in ht keyed to the thread handle.
              * We need this when cleaning up threads down below...
              */
             apr_thread_mutex_lock(child_lock);
@@ -1134,7 +1134,7 @@ void child_main(apr_pool_t *pconf)
                      "Child: %d threads blocked on the completion port",
                      g_blocked_threads);
         for (i=g_blocked_threads; i > 0; i--) {
-            PostQueuedCompletionStatus(ThreadDispatchIOCP, 0, 
+            PostQueuedCompletionStatus(ThreadDispatchIOCP, 0,
                                        IOCP_SHUTDOWN, NULL);
         }
         Sleep(1000);
@@ -1149,7 +1149,7 @@ void child_main(apr_pool_t *pconf)
     apr_thread_mutex_unlock(qlock);
 
     /* Give busy threads a chance to service their connections
-     * (no more than the global server timeout period which 
+     * (no more than the global server timeout period which
      * we track in msec remaining).
      */
     watch_thread = 0;
@@ -1170,10 +1170,10 @@ void child_main(apr_pool_t *pconf)
 
             /* Every 30 seconds give an update */
             if ((time_remains % 30000) == 0) {
-                ap_log_error(APLOG_MARK, APLOG_NOTICE, APR_SUCCESS, 
+                ap_log_error(APLOG_MARK, APLOG_NOTICE, APR_SUCCESS,
                              ap_server_conf,
                              "Child: Waiting %d more seconds "
-                             "for %d worker threads to finish.", 
+                             "for %d worker threads to finish.",
                              time_remains / 1000, threads_created);
             }
             /* We'll poll from the top, 10 times per second */

Modified: httpd/httpd/trunk/server/mpm/winnt/mpm_winnt.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/winnt/mpm_winnt.c?rev=1174751&r1=1174750&r2=1174751&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/winnt/mpm_winnt.c (original)
+++ httpd/httpd/trunk/server/mpm/winnt/mpm_winnt.c Fri Sep 23 13:39:32 2011
@@ -624,7 +624,7 @@ static int create_process(apr_pool_t *p,
     for (envc = 0; _environ[envc]; ++envc) {
         ;
     }
-    env = apr_palloc(ptemp, (envc + 2) * sizeof (char*));  
+    env = apr_palloc(ptemp, (envc + 2) * sizeof (char*));
     memcpy(env, _environ, envc * sizeof (char*));
     apr_snprintf(pidbuf, sizeof(pidbuf), "AP_PARENT_PID=%lu", parent_pid);
     env[envc] = pidbuf;
@@ -1026,7 +1026,7 @@ static void winnt_rewrite_args(process_r
     /* We wish this was *always* a reservation, but sadly it wasn't so and
      * we couldn't break a hard limit prior to NT Kernel 5.1
      */
-    if (osver.dwPlatformId == VER_PLATFORM_WIN32_NT 
+    if (osver.dwPlatformId == VER_PLATFORM_WIN32_NT
         && ((osver.dwMajorVersion > 5)
          || ((osver.dwMajorVersion == 5) && (osver.dwMinorVersion > 0)))) {
         stack_res_flag = STACK_SIZE_PARAM_IS_A_RESERVATION;
@@ -1072,7 +1072,7 @@ static void winnt_rewrite_args(process_r
         }
 
         /* This child needs the existing stderr opened for logging,
-         * already 
+         * already
          */
 
 
@@ -1231,7 +1231,7 @@ static void winnt_rewrite_args(process_r
 
         /* Open a null handle to soak stdout in this process.
          * Windows service processes are missing any file handle
-         * usable for stdin/out/err.  This was the cause of later 
+         * usable for stdin/out/err.  This was the cause of later
          * trouble with invocations of apr_file_open_stdout()
          */
         if ((rv = apr_file_open(&nullfile, "NUL",
@@ -1605,7 +1605,7 @@ static int winnt_post_config(apr_pool_t 
             }
         }
         /* Always reset our console handler to be the first, even on a restart
-        *  because some modules (e.g. mod_perl) might have set a console 
+        *  because some modules (e.g. mod_perl) might have set a console
         *  handler to terminate the process.
         */
         if (strcasecmp(signal_arg, "runservice"))

Modified: httpd/httpd/trunk/server/mpm/winnt/nt_eventlog.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/winnt/nt_eventlog.c?rev=1174751&r1=1174750&r2=1174751&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/winnt/nt_eventlog.c (original)
+++ httpd/httpd/trunk/server/mpm/winnt/nt_eventlog.c Fri Sep 23 13:39:32 2011
@@ -157,7 +157,7 @@ void mpm_nt_eventlog_stderr_open(const c
 
     WaitForSingleObject(stderr_ready, INFINITE);
 
-    if ((apr_file_open_stderr(&stderr_file, p) 
+    if ((apr_file_open_stderr(&stderr_file, p)
              == APR_SUCCESS)
      && (apr_os_file_put(&eventlog_file, &hPipeWrite, APR_WRITE, p)
              == APR_SUCCESS))

Modified: httpd/httpd/trunk/server/mpm/winnt/service.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/winnt/service.c?rev=1174751&r1=1174750&r2=1174751&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/winnt/service.c (original)
+++ httpd/httpd/trunk/server/mpm/winnt/service.c Fri Sep 23 13:39:32 2011
@@ -262,7 +262,7 @@ static void set_service_description(void
 
 /* handle the SCM's ControlService() callbacks to our service */
 
-static DWORD WINAPI service_nt_ctrl(DWORD dwCtrlCode, DWORD dwEventType, 
+static DWORD WINAPI service_nt_ctrl(DWORD dwCtrlCode, DWORD dwEventType,
                                    LPVOID lpEventData, LPVOID lpContext)
 {
     nt_service_ctx_t *ctx = lpContext;

Modified: httpd/httpd/trunk/server/mpm/worker/worker.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/worker/worker.c?rev=1174751&r1=1174750&r2=1174751&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/worker/worker.c (original)
+++ httpd/httpd/trunk/server/mpm/worker/worker.c Fri Sep 23 13:39:32 2011
@@ -275,7 +275,7 @@ static void wakeup_listener(void)
     }
 
     /* unblock the listener if it's waiting for a worker */
-    ap_queue_info_term(worker_queue_info); 
+    ap_queue_info_term(worker_queue_info);
 
     /*
      * we should just be able to "kill(ap_my_pid, LISTENER_SIGNAL)" on all
@@ -661,15 +661,15 @@ static void accept_mutex_error(const cha
     if (ap_scoreboard_image->parent[process_slot].generation !=
         ap_scoreboard_image->global->running_generation) {
         level = APLOG_DEBUG; /* common to get these at restart time */
-    } 
-    else if (requests_this_child == INT_MAX  
+    }
+    else if (requests_this_child == INT_MAX
         || ((requests_this_child == ap_max_requests_per_child)
-            && ap_max_requests_per_child)) { 
+            && ap_max_requests_per_child)) {
         ap_log_error(APLOG_MARK, level, rv, ap_server_conf,
                      "apr_proc_mutex_%s failed "
                      "before this child process served any requests.",
                      func);
-        clean_child_exit(APEXIT_CHILDSICK); 
+        clean_child_exit(APEXIT_CHILDSICK);
     }
     ap_log_error(APLOG_MARK, level, rv, ap_server_conf,
                  "apr_proc_mutex_%s failed. Attempting to "
@@ -977,7 +977,7 @@ worker_pop:
         bucket_alloc = apr_bucket_alloc_create(ptrans);
         process_socket(thd, ptrans, csd, process_slot, thread_slot, bucket_alloc);
         worker_sockets[thread_slot] = NULL;
-        requests_this_child--; 
+        requests_this_child--;
         apr_pool_clear(ptrans);
         last_ptrans = ptrans;
     }
@@ -1500,7 +1500,7 @@ static void perform_idle_server_maintena
              */
             if (ps->pid != 0) { /* XXX just set all_dead_threads in outer for
                                    loop if no pid?  not much else matters */
-                if (status <= SERVER_READY && 
+                if (status <= SERVER_READY &&
                         !ps->quiescing &&
                         ps->generation == retained->my_generation) {
                     ++idle_thread_count;
@@ -1571,7 +1571,7 @@ static void perform_idle_server_maintena
         /* terminate the free list */
         if (free_length == 0) { /* scoreboard is full, can't fork */
 
-            if (active_thread_count >= ap_daemons_limit * threads_per_child) { 
+            if (active_thread_count >= ap_daemons_limit * threads_per_child) {
                 /* no threads are "inactive" - starting, stopping, etc. */
                 /* have we reached MaxRequestWorkers, or just getting close? */
                 if (0 == idle_thread_count) {

Modified: httpd/httpd/trunk/server/mpm_unix.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm_unix.c?rev=1174751&r1=1174750&r2=1174751&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm_unix.c (original)
+++ httpd/httpd/trunk/server/mpm_unix.c Fri Sep 23 13:39:32 2011
@@ -120,7 +120,7 @@ static int reclaim_one_pid(pid_t pid, ac
     /* Ensure pid sanity. */
     if (pid < 1) {
         return 1;
-    }        
+    }
 
     proc.pid = pid;
     waitret = apr_proc_wait(&proc, &status, &why, APR_NOWAIT);
@@ -350,7 +350,7 @@ apr_status_t ap_mpm_safe_kill(pid_t pid,
         return APR_EINVAL;
     }
 
-    pg = getpgid(pid);    
+    pg = getpgid(pid);
     if (pg == -1) {
         /* Process already dead... */
         return errno;
@@ -362,7 +362,7 @@ apr_status_t ap_mpm_safe_kill(pid_t pid,
                      "process group", sig, (long)pid);
         return APR_EINVAL;
     }
-#endif        
+#endif
 
     return kill(pid, sig) ? errno : APR_SUCCESS;
 }
@@ -777,8 +777,8 @@ void ap_mpm_rewrite_args(process_rec *pr
 
     process->argc = mpm_new_argv->nelts;
     process->argv = (const char * const *)mpm_new_argv->elts;
-  
-    if (NULL == dash_k_arg) { 
+
+    if (NULL == dash_k_arg) {
         dash_k_arg = dash_k_arg_noarg;
     }
 

Modified: httpd/httpd/trunk/server/protocol.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/protocol.c?rev=1174751&r1=1174750&r2=1174751&view=diff
==============================================================================
--- httpd/httpd/trunk/server/protocol.c (original)
+++ httpd/httpd/trunk/server/protocol.c Fri Sep 23 13:39:32 2011
@@ -916,7 +916,7 @@ request_rec *ap_read_request(conn_rec *c
     tmp_bb = apr_brigade_create(r->pool, r->connection->bucket_alloc);
 
     ap_run_pre_read_request(r, conn);
-    
+
     /* Get the request... */
     if (!read_request_line(r, tmp_bb)) {
         if (r->status == HTTP_REQUEST_URI_TOO_LARGE
@@ -1379,7 +1379,7 @@ AP_DECLARE(apr_status_t) ap_send_fd(apr_
     apr_status_t rv;
 
     bb = apr_brigade_create(r->pool, c->bucket_alloc);
-    
+
     apr_brigade_insert_file(bb, fd, offset, len, r->pool);
 
     rv = ap_pass_brigade(r->output_filters, bb);

Modified: httpd/httpd/trunk/server/request.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/request.c?rev=1174751&r1=1174750&r2=1174751&view=diff
==============================================================================
--- httpd/httpd/trunk/server/request.c (original)
+++ httpd/httpd/trunk/server/request.c Fri Sep 23 13:39:32 2011
@@ -1845,7 +1845,7 @@ static request_rec *make_sub_request(con
      * until some module interjects and changes the value.
      */
     rnew->used_path_info = AP_REQ_DEFAULT_PATH_INFO;
-    
+
     /* Pass on the kept body (if any) into the new request. */
     rnew->kept_body = r->kept_body;
 

Modified: httpd/httpd/trunk/server/util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util.c?rev=1174751&r1=1174750&r2=1174751&view=diff
==============================================================================
--- httpd/httpd/trunk/server/util.c (original)
+++ httpd/httpd/trunk/server/util.c Fri Sep 23 13:39:32 2011
@@ -1984,7 +1984,7 @@ char *ap_get_local_host(apr_pool_t *a)
     ap_log_perror(APLOG_MARK, APLOG_ALERT|APLOG_STARTUP, 0, a,
                  "%s: Could not reliably determine the server's fully qualified "
                  "domain name, using %s. Set the 'ServerName' directive globally "
-                 "to suppress this message", 
+                 "to suppress this message",
                  ap_server_argv0, server_hostname);
 
     return server_hostname;

Modified: httpd/httpd/trunk/server/util_expr_eval.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util_expr_eval.c?rev=1174751&r1=1174750&r2=1174751&view=diff
==============================================================================
--- httpd/httpd/trunk/server/util_expr_eval.c (original)
+++ httpd/httpd/trunk/server/util_expr_eval.c Fri Sep 23 13:39:32 2011
@@ -99,7 +99,7 @@ static const char *ap_expr_eval_word(ap_
     return result;
 }
 
-static const char *ap_expr_eval_var(ap_expr_eval_ctx_t *ctx, 
+static const char *ap_expr_eval_var(ap_expr_eval_ctx_t *ctx,
                                     const ap_expr_var_func_t *func,
                                     const void *data)
 {
@@ -862,7 +862,7 @@ static const char *req_table_func(ap_exp
             return v;
         }
         t = ctx->r->err_headers_out;
-    }        
+    }
     else if (name[0] == 'n')        /* notes */
         t = ctx->r->notes;
     else if (name[3] == 'e')        /* reqenv */
@@ -980,7 +980,7 @@ static const char *unescape_func(ap_expr
     if (ret == OK)
         return result;
     ap_log_rerror(LOG_MARK(ctx->info), APLOG_DEBUG, 0, ctx->r,
-                      "%s %% escape in unescape('%s') at %s:%d", 
+                      "%s %% escape in unescape('%s') at %s:%d",
 		      ret == HTTP_BAD_REQUEST ? "Bad" : "Forbidden", arg,
 		      ctx->info->filename, ctx->info->line_number);
     return "";

Modified: httpd/httpd/trunk/server/util_expr_parse.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util_expr_parse.c?rev=1174751&r1=1174750&r2=1174751&view=diff
==============================================================================
--- httpd/httpd/trunk/server/util_expr_parse.c (original)
+++ httpd/httpd/trunk/server/util_expr_parse.c Fri Sep 23 13:39:32 2011
@@ -2,20 +2,20 @@
 /* A Bison parser, made by GNU Bison 2.4.1.  */
 
 /* Skeleton implementation for Bison's Yacc-like parsers in C
-   
+
       Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
    Free Software Foundation, Inc.
-   
+
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
-   
+
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-   
+
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
@@ -28,7 +28,7 @@
    special exception, which will cause the skeleton and the resulting
    Bison output files to be licensed under the GNU General Public
    License without this special exception.
-   
+
    This special exception was added by the Free Software Foundation in
    version 2.2 of Bison.  */
 

Modified: httpd/httpd/trunk/server/util_expr_scan.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util_expr_scan.c?rev=1174751&r1=1174750&r2=1174751&view=diff
==============================================================================
--- httpd/httpd/trunk/server/util_expr_scan.c (original)
+++ httpd/httpd/trunk/server/util_expr_scan.c Fri Sep 23 13:39:32 2011
@@ -34,7 +34,7 @@
 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
 
 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types. 
+ * if you want the limit (max/min) macros for int types.
  */
 #ifndef __STDC_LIMIT_MACROS
 #define __STDC_LIMIT_MACROS 1
@@ -51,7 +51,7 @@ typedef uint32_t flex_uint32_t;
 typedef signed char flex_int8_t;
 typedef short int flex_int16_t;
 typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t; 
+typedef unsigned char flex_uint8_t;
 typedef unsigned short int flex_uint16_t;
 typedef unsigned int flex_uint32_t;
 
@@ -184,7 +184,7 @@ typedef struct yy_buffer_state *YY_BUFFE
 #define EOB_ACT_LAST_MATCH 2
 
     #define YY_LESS_LINENO(n)
-    
+
 /* Return all but the first "n" matched characters back to the input stream. */
 #define yyless(n) \
 	do \
@@ -246,7 +246,7 @@ struct yy_buffer_state
 
     int yy_bs_lineno; /**< The line count. */
     int yy_bs_column; /**< The column count. */
-    
+
 	/* Whether to try to fill the input buffer when we reach the
 	 * end of it.
 	 */
@@ -673,7 +673,7 @@ static int yy_init_globals (yyscan_t yys
     /* This must go here because YYSTYPE and YYLTYPE are included
      * from bison output in section 1.*/
     #    define yylval yyg->yylval_r
-    
+
 int ap_expr_yylex_init (yyscan_t* scanner);
 
 int ap_expr_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
@@ -742,9 +742,9 @@ static int input (yyscan_t yyscanner );
 #endif
 
     static void yy_push_state (int new_state ,yyscan_t yyscanner);
-    
+
     static void yy_pop_state (yyscan_t yyscanner );
-    
+
 /* Amount of stuff to slurp up with each read. */
 #ifndef YY_READ_BUF_SIZE
 #ifdef __ia64__
@@ -967,7 +967,7 @@ case 1:
 /* rule 1 can match eol */
 YY_RULE_SETUP
 #line 103 "util_expr_scan.l"
-{ 
+{
     /* NOP */
 }
 	YY_BREAK
@@ -2001,7 +2001,7 @@ static void ap_expr_yy_load_buffer_state
     YY_BUFFER_STATE ap_expr_yy_create_buffer  (FILE * file, int  size , yyscan_t yyscanner)
 {
 	YY_BUFFER_STATE b;
-    
+
 	b = (YY_BUFFER_STATE) ap_expr_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
 	if ( ! b )
 		YY_FATAL_ERROR( "out of dynamic memory in ap_expr_yy_create_buffer()" );
@@ -2067,7 +2067,7 @@ static void ap_expr_yy_load_buffer_state
     }
 
         b->yy_is_interactive = 0;
-    
+
 	errno = oerrno;
 }
 
@@ -2173,9 +2173,9 @@ static void ap_expr_yyensure_buffer_stac
 								, yyscanner);
 		if ( ! yyg->yy_buffer_stack )
 			YY_FATAL_ERROR( "out of dynamic memory in ap_expr_yyensure_buffer_stack()" );
-								  
+
 		memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-				
+
 		yyg->yy_buffer_stack_max = num_to_alloc;
 		yyg->yy_buffer_stack_top = 0;
 		return;
@@ -2204,12 +2204,12 @@ static void ap_expr_yyensure_buffer_stac
  * @param base the character buffer
  * @param size the size in bytes of the character buffer
  * @param yyscanner The scanner object.
- * @return the newly allocated buffer state object. 
+ * @return the newly allocated buffer state object.
  */
 YY_BUFFER_STATE ap_expr_yy_scan_buffer  (char * base, yy_size_t  size , yyscan_t yyscanner)
 {
 	YY_BUFFER_STATE b;
-    
+
 	if ( size < 2 ||
 	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
 	     base[size-1] != YY_END_OF_BUFFER_CHAR )
@@ -2245,7 +2245,7 @@ YY_BUFFER_STATE ap_expr_yy_scan_buffer  
  */
 YY_BUFFER_STATE ap_expr_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
 {
-    
+
 	return ap_expr_yy_scan_bytes(yystr,strlen(yystr) ,yyscanner);
 }
 
@@ -2262,7 +2262,7 @@ YY_BUFFER_STATE ap_expr_yy_scan_bytes  (
 	char *buf;
 	yy_size_t n;
 	int i;
-    
+
 	/* Get memory for full buffer, including space for trailing EOB's. */
 	n = _yybytes_len + 2;
 	buf = (char *) ap_expr_yyalloc(n ,yyscanner );
@@ -2364,10 +2364,10 @@ YY_EXTRA_TYPE ap_expr_yyget_extra  (yysc
 int ap_expr_yyget_lineno  (yyscan_t yyscanner)
 {
     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-    
+
         if (! YY_CURRENT_BUFFER)
             return 0;
-    
+
     return yylineno;
 }
 
@@ -2432,8 +2432,8 @@ void ap_expr_yyset_lineno (int  line_num
 
         /* lineno is only valid if an input buffer exists. */
         if (! YY_CURRENT_BUFFER )
-           yy_fatal_error( "ap_expr_yyset_lineno called with no buffer" , yyscanner); 
-    
+           yy_fatal_error( "ap_expr_yyset_lineno called with no buffer" , yyscanner);
+
     yylineno = line_number;
 }
 
@@ -2533,20 +2533,20 @@ int ap_expr_yylex_init_extra(YY_EXTRA_TY
         errno = EINVAL;
         return 1;
     }
-	
+
     *ptr_yy_globals = (yyscan_t) ap_expr_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
-	
+
     if (*ptr_yy_globals == NULL){
         errno = ENOMEM;
         return 1;
     }
-    
+
     /* By setting to 0xAA, we expose bugs in
     yy_init_globals. Leave at 0x00 for releases. */
     memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
-    
+
     ap_expr_yyset_extra (yy_user_defined, *ptr_yy_globals);
-    
+
     return yy_init_globals ( *ptr_yy_globals );
 }
 

Modified: httpd/httpd/trunk/server/util_mutex.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util_mutex.c?rev=1174751&r1=1174750&r2=1174751&view=diff
==============================================================================
--- httpd/httpd/trunk/server/util_mutex.c (original)
+++ httpd/httpd/trunk/server/util_mutex.c Fri Sep 23 13:39:32 2011
@@ -181,7 +181,7 @@ AP_DECLARE_NONSTD(const char *)ap_set_mu
 
     mechdir = ap_getword_conf(cmd->pool, &arg);
     if (*mechdir == '\0') {
-        return "Mutex requires at least a mechanism argument (" 
+        return "Mutex requires at least a mechanism argument ("
                AP_ALL_AVAILABLE_MUTEXES_STRING ")";
     }
 

Modified: httpd/httpd/trunk/server/util_pcre.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util_pcre.c?rev=1174751&r1=1174750&r2=1174751&view=diff
==============================================================================
--- httpd/httpd/trunk/server/util_pcre.c (original)
+++ httpd/httpd/trunk/server/util_pcre.c Fri Sep 23 13:39:32 2011
@@ -115,7 +115,7 @@ AP_DECLARE(void) ap_regfree(ap_regex_t *
  *  preg        points to a structure for recording the compiled expression
  *  pattern     the pattern to compile
  *  cflags      compilation flags
- * 
+ *
  * Returns:      0 on success
  *               various non-zero codes on failure
 */

Modified: httpd/httpd/trunk/server/util_script.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util_script.c?rev=1174751&r1=1174750&r2=1174751&view=diff
==============================================================================
--- httpd/httpd/trunk/server/util_script.c (original)
+++ httpd/httpd/trunk/server/util_script.c Fri Sep 23 13:39:32 2011
@@ -483,7 +483,7 @@ AP_DECLARE(int) ap_scan_script_header_er
 
             /* PR#38070: This fails because it gets confused when a
              * CGI Status header overrides ap_meets_conditions.
-             * 
+             *
              * We can fix that by dropping ap_meets_conditions when
              * Status has been set.  Since this is the only place
              * cgi_status gets used, let's test it explicitly.
@@ -809,7 +809,7 @@ argstr_to_table(char *str, apr_table_t *
     if (str == NULL) {
         return;
     }
-    
+
     key = apr_strtok(str, "&", &strtok_state);
     while (key) {
         value = strchr(key, '=');

Modified: httpd/httpd/trunk/server/vhost.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/vhost.c?rev=1174751&r1=1174750&r2=1174751&view=diff
==============================================================================
--- httpd/httpd/trunk/server/vhost.c (original)
+++ httpd/httpd/trunk/server/vhost.c Fri Sep 23 13:39:32 2011
@@ -71,7 +71,7 @@ struct ipaddr_chain {
     server_rec *server;         /* the server to use if this matches */
     name_chain *names;          /* if non-NULL then a list of name-vhosts
                                  * sharing this address */
-    name_chain *initialnames;   /* no runtime use, temporary storage of first 
+    name_chain *initialnames;   /* no runtime use, temporary storage of first
                                  * NVH'es names */
 };
 
@@ -254,11 +254,11 @@ AP_DECLARE_NONSTD(const char *)ap_set_na
                                                         const char *arg)
 {
     static int warnonce = 0;
-    if (++warnonce == 1) { 
-        ap_log_error(APLOG_MARK, APLOG_NOTICE|APLOG_STARTUP, APR_SUCCESS, NULL, 
-                     "NameVirtualHost has no effect and will be removed in the " 
-                     "next release %s:%d", 
-                     cmd->directive->filename, 
+    if (++warnonce == 1) {
+        ap_log_error(APLOG_MARK, APLOG_NOTICE|APLOG_STARTUP, APR_SUCCESS, NULL,
+                     "NameVirtualHost has no effect and will be removed in the "
+                     "next release %s:%d",
+                     cmd->directive->filename,
                      cmd->directive->line_num);
     }
 
@@ -395,7 +395,7 @@ static APR_INLINE ipaddr_chain *find_ipa
         if (wild_match == NULL && (cur->port == 0 || sa->port == 0)) {
             if (apr_sockaddr_equal(cur, sa)) {
                 /* don't break, continue looking for an exact match */
-                wild_match = trav; 
+                wild_match = trav;
             }
         }
     }
@@ -417,7 +417,7 @@ static ipaddr_chain *find_default_server
         if (wild_match == NULL && sar->host_port == 0) {
             /* don't break, continue looking for an exact match */
             wild_match = trav;
-        } 
+        }
     }
     return wild_match;
 }
@@ -525,16 +525,16 @@ static void add_name_vhost_config(apr_po
    nc->next = ic->names;
 
    /* iterating backwards, so each one we see becomes the current default server */
-   ic->server = s; 
+   ic->server = s;
 
-   if (ic->names == NULL) { 
-       if (ic->initialnames == NULL) { 
+   if (ic->names == NULL) {
+       if (ic->initialnames == NULL) {
            /* first pass, set these names aside in case we see another VH.
             * Until then, this looks like an IP-based VH to runtime.
             */
            ic->initialnames = nc;
        }
-       else { 
+       else {
            /* second pass through this chain -- this really is an NVH, and we
             * have two sets of names to link in.
             */
@@ -543,7 +543,7 @@ static void add_name_vhost_config(apr_po
            ic->initialnames = NULL;
        }
    }
-   else { 
+   else {
        /* 3rd or more -- just keep stacking the names */
        ic->names = nc;
    }
@@ -584,8 +584,8 @@ AP_DECLARE(void) ap_fini_vhost_config(ap
 
             if (!memcmp(sar->host_addr->ipaddr_ptr, inaddr_any, sar->host_addr->ipaddr_len)) {
                 ic = find_default_server(sar->host_port);
-                if (!ic || sar->host_port != ic->sar->host_port) { 
-                    /* No default server, or we found a default server but 
+                if (!ic || sar->host_port != ic->sar->host_port) {
+                    /* No default server, or we found a default server but
                     ** exactly one of us is a wildcard port, which means we want
                     ** two ip-based vhosts not an NVH with two names
                     */
@@ -599,8 +599,8 @@ AP_DECLARE(void) ap_fini_vhost_config(ap
                 /* see if it matches something we've already got */
                 ic = find_ipaddr(sar->host_addr);
 
-                if (!ic || sar->host_port != ic->sar->host_port) { 
-                    /* No matching server, or we found a matching server but 
+                if (!ic || sar->host_port != ic->sar->host_port) {
+                    /* No matching server, or we found a matching server but
                     ** exactly one of us is a wildcard port, which means we want
                     ** two ip-based vhosts not an NVH with two names
                     */

Modified: httpd/httpd/trunk/support/ab.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/ab.c?rev=1174751&r1=1174750&r2=1174751&view=diff
==============================================================================
--- httpd/httpd/trunk/support/ab.c (original)
+++ httpd/httpd/trunk/support/ab.c Fri Sep 23 13:39:32 2011
@@ -1201,12 +1201,12 @@ static void start_connect(struct connect
     }
 
     if (windowsize != 0) {
-        rv = apr_socket_opt_set(c->aprsock, APR_SO_SNDBUF, 
+        rv = apr_socket_opt_set(c->aprsock, APR_SO_SNDBUF,
                                 windowsize);
         if (rv != APR_SUCCESS && rv != APR_ENOTIMPL) {
             apr_err("socket send buffer", rv);
         }
-        rv = apr_socket_opt_set(c->aprsock, APR_SO_RCVBUF, 
+        rv = apr_socket_opt_set(c->aprsock, APR_SO_RCVBUF,
                                 windowsize);
         if (rv != APR_SUCCESS && rv != APR_ENOTIMPL) {
             apr_err("socket receive buffer", rv);
@@ -1252,7 +1252,7 @@ static void start_connect(struct connect
                    "\nTest aborted after 10 failures\n\n");
                 apr_err("apr_socket_connect()", rv);
             }
-            
+
             start_connect(c);
             return;
         }
@@ -1501,7 +1501,7 @@ static void read_connection(struct conne
                 /* The response may not have a Content-Length header */
                 if (!cl) {
                     c->keepalive = 1;
-                    c->length = 0; 
+                    c->length = 0;
                 }
             }
             c->bread += c->cbx - (s + l - c->cbuff) + r - tocopy;
@@ -1656,7 +1656,7 @@ static void test(void)
     }
 
     if (verbosity >= 2)
-        printf("INFO: %s header == \n---\n%s\n---\n", 
+        printf("INFO: %s header == \n---\n%s\n---\n",
                method_str[method], request);
 
     reqlen = strlen(request);
@@ -1708,7 +1708,7 @@ static void test(void)
     start = lasttime = apr_time_now();
     stoptime = tlimit ? (start + apr_time_from_sec(tlimit)) : AB_MAX;
 
-#ifdef SIGINT 
+#ifdef SIGINT
     /* Output the results if the user terminates the run early. */
     apr_signal(SIGINT, output_results);
 #endif
@@ -1768,10 +1768,10 @@ static void test(void)
                 bad++;
                 err_except++;
                 /* avoid apr_poll/EINPROGRESS loop on HP-UX, let recv discover ECONNREFUSED */
-                if (c->state == STATE_CONNECTING) { 
+                if (c->state == STATE_CONNECTING) {
                     read_connection(c);
                 }
-                else { 
+                else {
                     start_connect(c);
                 }
                 continue;
@@ -1807,7 +1807,7 @@ static void test(void)
             }
         }
     } while (lasttime < stoptime && done < requests);
-    
+
     if (heartbeatres)
         fprintf(stderr, "Finished %d requests\n", done);
     else

Modified: httpd/httpd/trunk/support/htcacheclean.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/htcacheclean.c?rev=1174751&r1=1174750&r2=1174751&view=diff
==============================================================================
--- httpd/httpd/trunk/support/htcacheclean.c (original)
+++ httpd/httpd/trunk/support/htcacheclean.c Fri Sep 23 13:39:32 2011
@@ -1349,7 +1349,7 @@ static void usage(const char *error)
 #undef NL
 
 static void usage_repeated_arg(apr_pool_t *pool, char option) {
-    usage(apr_psprintf(pool, 
+    usage(apr_psprintf(pool,
                        "The option '%c' cannot be specified more than once",
                        option));
 }
@@ -1370,7 +1370,7 @@ static void log_pid(apr_pool_t *pool, co
         if (errfile) {
             apr_file_printf(errfile,
                             "Could not write the pid file '%s': %s" APR_EOL_STR,
-                            pidfilename, 
+                            pidfilename,
                             apr_strerror(status, errmsg, sizeof errmsg));
         }
         exit(1);

Modified: httpd/httpd/trunk/support/htpasswd.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/htpasswd.c?rev=1174751&r1=1174750&r2=1174751&view=diff
==============================================================================
--- httpd/httpd/trunk/support/htpasswd.c (original)
+++ httpd/httpd/trunk/support/htpasswd.c Fri Sep 23 13:39:32 2011
@@ -125,7 +125,7 @@ static void to64(char *s, unsigned long 
 
 static void generate_salt(char *s, size_t size)
 {
-    static unsigned char tbl[] = 
+    static unsigned char tbl[] =
         "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
     size_t i;
     for (i = 0; i < size; ++i) {

Modified: httpd/httpd/trunk/support/rotatelogs.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/rotatelogs.c?rev=1174751&r1=1174750&r2=1174751&view=diff
==============================================================================
--- httpd/httpd/trunk/support/rotatelogs.c (original)
+++ httpd/httpd/trunk/support/rotatelogs.c Fri Sep 23 13:39:32 2011
@@ -288,7 +288,7 @@ static void post_rotate(apr_pool_t *pool
             exit(2);
         }
     }
-    
+
     if (!config->postrotate_prog) {
         /* Nothing more to do. */
         return;
@@ -358,7 +358,7 @@ static void doRotate(rotate_config_t *co
     int tLogStart;
     apr_status_t rv;
     struct logfile newlog;
- 
+
     status->rotateReason = ROTATE_NONE;
 
     if (config->tRotation) {
@@ -427,10 +427,10 @@ static void doRotate(rotate_config_t *co
             fprintf(stderr, "Could not open log file '%s' (%s)\n", newlog.name, error);
             exit(2);
         }
-        
+
         /* Throw away new state; it isn't going to be used. */
         apr_pool_destroy(newlog.pool);
-        
+
         /* Try to keep this error message constant length
          * in case it occurs several times. */
         apr_snprintf(status->errbuf, sizeof status->errbuf,
@@ -438,17 +438,17 @@ static void doRotate(rotate_config_t *co
                      "new log file, %10d messages lost: %-25.25s\n",
                      status->nMessCount, error);
         nWrite = strlen(status->errbuf);
-        
+
         if (apr_file_trunc(status->current.fd, 0) != APR_SUCCESS) {
             fprintf(stderr, "Error truncating the file %s\n", status->current.name);
             exit(2);
-        }        
+        }
         if (apr_file_write(status->current.fd, status->errbuf, &nWrite) != APR_SUCCESS) {
             fprintf(stderr, "Error writing to the file %s\n", status->current.name);
             exit(2);
         }
     }
-    
+
     status->nMessCount = 0;
 }
 

Modified: httpd/httpd/trunk/support/win32/ApacheMonitor.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/win32/ApacheMonitor.c?rev=1174751&r1=1174750&r2=1174751&view=diff
==============================================================================
--- httpd/httpd/trunk/support/win32/ApacheMonitor.c (original)
+++ httpd/httpd/trunk/support/win32/ApacheMonitor.c Fri Sep 23 13:39:32 2011
@@ -219,7 +219,7 @@ void ErrorMessage(LPCTSTR szError, BOOL 
 }
 
 
-int am_RespawnAsUserAdmin(HWND hwnd, DWORD op, LPCTSTR szService, 
+int am_RespawnAsUserAdmin(HWND hwnd, DWORD op, LPCTSTR szService,
                           LPCTSTR szComputerName)
 {
     TCHAR args[MAX_PATH + MAX_COMPUTERNAME_LENGTH + 12];
@@ -229,7 +229,7 @@ int am_RespawnAsUserAdmin(HWND hwnd, DWO
         return 0;
     }
 
-    _sntprintf(args, sizeof(args) / sizeof(TCHAR), 
+    _sntprintf(args, sizeof(args) / sizeof(TCHAR),
                _T("%d \"%s\" \"%s\""), op, szService,
                szComputerName ? szComputerName : _T(""));
     if (!ShellExecute(hwnd, _T("runas"), __targv[0], args, NULL, SW_NORMAL)) {
@@ -259,7 +259,7 @@ BOOL am_ConnectComputer(LPTSTR szCompute
     }
     if (RegConnectRegistry(szComputerName, HKEY_LOCAL_MACHINE, &hKeyRemote)
             != ERROR_SUCCESS) {
-        _sntprintf(szTmp, sizeof(szTmp) / sizeof(TCHAR), 
+        _sntprintf(szTmp, sizeof(szTmp) / sizeof(TCHAR),
                    g_lpMsg[IDS_MSG_ECONNECT - IDS_MSG_FIRST],
                    szComputerName);
         ErrorMessage(szTmp, FALSE);
@@ -303,7 +303,7 @@ BOOL GetSystemOSVersion(LPDWORD dwVersio
         if (osvi.dwMajorVersion >= 5)
             *dwVersion = OS_VERSION_WIN2K;
         else
-            *dwVersion = OS_VERSION_WINNT;            
+            *dwVersion = OS_VERSION_WINNT;
         break;
 
     case VER_PLATFORM_WIN32_WINDOWS:
@@ -351,11 +351,11 @@ static VOID ShowNotifyIcon(HWND hWnd, DW
         _tcscpy(nid.szTip, g_lpMsg[IDS_MSG_RUNNINGALL - IDS_MSG_FIRST]);
     }
     else if (n) {
-        _sntprintf(nid.szTip, sizeof(nid.szTip) / sizeof(TCHAR), 
+        _sntprintf(nid.szTip, sizeof(nid.szTip) / sizeof(TCHAR),
                   g_lpMsg[IDS_MSG_RUNNING - IDS_MSG_FIRST], n, i);
     }
     else if (i) {
-        _sntprintf(nid.szTip, sizeof(nid.szTip) / sizeof(TCHAR), 
+        _sntprintf(nid.szTip, sizeof(nid.szTip) / sizeof(TCHAR),
                   g_lpMsg[IDS_MSG_RUNNINGNONE - IDS_MSG_FIRST], i);
     }
     else {
@@ -563,7 +563,7 @@ BOOL ApacheManageService(LPCTSTR szServi
     {
         /* Avoid recursion of ImagePath NULL (from this Respawn) */
         if (szImagePath) {
-            am_RespawnAsUserAdmin(g_hwndMain, dwCommand, 
+            am_RespawnAsUserAdmin(g_hwndMain, dwCommand,
                                   szServiceName, szComputerName);
         }
         else {
@@ -581,7 +581,7 @@ BOOL ApacheManageService(LPCTSTR szServi
         switch (dwCommand)
         {
           case SERVICE_CONTROL_STOP:
-            _sntprintf(szMsg, sizeof(szMsg) / sizeof(TCHAR), 
+            _sntprintf(szMsg, sizeof(szMsg) / sizeof(TCHAR),
                        g_lpMsg[IDS_MSG_SRVSTOP - IDS_MSG_FIRST],
                        szServiceName);
             addListBoxString(g_hwndStdoutList, szMsg);
@@ -604,7 +604,7 @@ BOOL ApacheManageService(LPCTSTR szServi
                 if (schSStatus.dwCurrentState == SERVICE_STOPPED)
                 {
                     retValue = TRUE;
-                    _sntprintf(szMsg, sizeof(szMsg) / sizeof(TCHAR), 
+                    _sntprintf(szMsg, sizeof(szMsg) / sizeof(TCHAR),
                                g_lpMsg[IDS_MSG_SRVSTOPPED - IDS_MSG_FIRST],
                                szServiceName);
                     addListBoxString(g_hwndStdoutList, szMsg);
@@ -637,7 +637,7 @@ BOOL ApacheManageService(LPCTSTR szServi
                 if (schSStatus.dwCurrentState == SERVICE_RUNNING)
                 {
                     retValue = TRUE;
-                    _sntprintf(szMsg, sizeof(szMsg) / sizeof(TCHAR), 
+                    _sntprintf(szMsg, sizeof(szMsg) / sizeof(TCHAR),
                                g_lpMsg[IDS_MSG_SRVSTARTED - IDS_MSG_FIRST],
                                szServiceName);
                     addListBoxString(g_hwndStdoutList, szMsg);
@@ -646,7 +646,7 @@ BOOL ApacheManageService(LPCTSTR szServi
             break;
 
           case SERVICE_APACHE_RESTART:
-            _sntprintf(szMsg, sizeof(szMsg) / sizeof(TCHAR), 
+            _sntprintf(szMsg, sizeof(szMsg) / sizeof(TCHAR),
                        g_lpMsg[IDS_MSG_SRVRESTART - IDS_MSG_FIRST],
                        szServiceName);
             addListBoxString(g_hwndStdoutList, szMsg);
@@ -673,7 +673,7 @@ BOOL ApacheManageService(LPCTSTR szServi
             if (schSStatus.dwCurrentState == SERVICE_RUNNING)
             {
                 retValue = TRUE;
-                _sntprintf(szMsg, sizeof(szMsg) / sizeof(TCHAR), 
+                _sntprintf(szMsg, sizeof(szMsg) / sizeof(TCHAR),
                            g_lpMsg[IDS_MSG_SRVRESTARTED - IDS_MSG_FIRST],
                            szServiceName);
                 addListBoxString(g_hwndStdoutList, szMsg);
@@ -1474,7 +1474,7 @@ static int KillAllMonitors(void)
     int exitcode = 0;
     PWTS_PROCESS_INFO tsProcs;
     DWORD tsProcCount, i;
-    DWORD thisProcId; 
+    DWORD thisProcId;
 
     /* This is graceful, close our own Window, clearing the icon */
     if ((appwindow = FindWindow(g_szWindowClass, g_szTitle)) != NULL)
@@ -1498,7 +1498,7 @@ static int KillAllMonitors(void)
     for (i = 0; i < tsProcCount; ++i) {
         if (_tcscmp(tsProcs[i].pProcessName, _T(AM_STRINGIFY(BIN_NAME))) == 0
                 && tsProcs[i].ProcessId != thisProcId)
-            WTSTerminateProcess(WTS_CURRENT_SERVER_HANDLE, 
+            WTSTerminateProcess(WTS_CURRENT_SERVER_HANDLE,
                                 tsProcs[i].ProcessId, 1);
     }
     WTSFreeMemory(tsProcs);