]> granicus.if.org Git - apache/commitdiff
Log errors from ap_accept().
authorJeff Trawick <trawick@apache.org>
Sat, 24 Jun 2000 14:33:48 +0000 (14:33 +0000)
committerJeff Trawick <trawick@apache.org>
Sat, 24 Jun 2000 14:33:48 +0000 (14:33 +0000)
Fix bad ap_log_error() argument list.
Pass correct error code from ap_poll().

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85683 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/mpmt_pthread/mpmt_pthread.c

index f4aa7a92e12afd49bc32d9af9a4376f692679b29..863e30ba99df1501724a0411f2664dde53bd1f8c 100644 (file)
@@ -422,7 +422,7 @@ static void process_child_status(ap_proc_t *pid, ap_wait_t status)
 #endif
 #else
            ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE,
-                        ap_server_conf,
+                        0, ap_server_conf,
                         "child pid %ld exit signal %d",
                         (long)pid->pid, WTERMSIG(status));
 #endif
@@ -597,10 +597,10 @@ static void * worker_thread(void * dummy)
                     continue;
                 }
 
-                /* poll() will only return errors in catastrophic
+                /* ap_poll() will only return errors in catastrophic
                  * circumstances. Let's try exiting gracefully, for now. */
-                ap_log_error(APLOG_MARK, APLOG_ERR, errno, (const server_rec *)
-                             ap_get_server_conf(), "poll: (listen)");
+                ap_log_error(APLOG_MARK, APLOG_ERR, ret, (const server_rec *)
+                             ap_get_server_conf(), "ap_poll: (listen)");
                 workers_may_exit = 1;
             }
 
@@ -638,7 +638,10 @@ static void * worker_thread(void * dummy)
         }
     got_fd:
         if (!workers_may_exit) {
-            ap_accept(&csd, sd, ptrans);
+            if ((rv = ap_accept(&csd, sd, ptrans)) != APR_SUCCESS) {
+                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,
@@ -1092,7 +1095,7 @@ int ap_mpm_run(ap_pool_t *_pconf, ap_pool_t *plog, server_rec *s)
     if (rv != APR_SUCCESS) {
         ap_log_error(APLOG_MARK, APLOG_ERR, rv,
                      (const server_rec*) ap_server_conf,
-                     "pipe: (pipe_of_death)");
+                     "ap_create_pipe (pipe_of_death)");
         exit(1);
     }