httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r813521 - in /httpd/mod_fcgid/trunk/modules/fcgid: fcgid_bridge.c fcgid_pm_main.c fcgid_pm_unix.c fcgid_pm_win.c fcgid_proc_unix.c fcgid_proc_win.c
Date Thu, 10 Sep 2009 17:33:32 GMT
Author: trawick
Date: Thu Sep 10 17:33:32 2009
New Revision: 813521

URL: http://svn.apache.org/viewvc?rev=813521&view=rev
Log:
fix some problems with the apr_status_t parameter to ap_log_XXX

Modified:
    httpd/mod_fcgid/trunk/modules/fcgid/fcgid_bridge.c
    httpd/mod_fcgid/trunk/modules/fcgid/fcgid_pm_main.c
    httpd/mod_fcgid/trunk/modules/fcgid/fcgid_pm_unix.c
    httpd/mod_fcgid/trunk/modules/fcgid/fcgid_pm_win.c
    httpd/mod_fcgid/trunk/modules/fcgid/fcgid_proc_unix.c
    httpd/mod_fcgid/trunk/modules/fcgid/fcgid_proc_win.c

Modified: httpd/mod_fcgid/trunk/modules/fcgid/fcgid_bridge.c
URL: http://svn.apache.org/viewvc/httpd/mod_fcgid/trunk/modules/fcgid/fcgid_bridge.c?rev=813521&r1=813520&r2=813521&view=diff
==============================================================================
--- httpd/mod_fcgid/trunk/modules/fcgid/fcgid_bridge.c (original)
+++ httpd/mod_fcgid/trunk/modules/fcgid/fcgid_bridge.c Thu Sep 10 17:33:32 2009
@@ -402,7 +402,7 @@
     brigade_stdout =
         apr_brigade_create(request_pool, r->connection->bucket_alloc);
     if (!brigade_stdout) {
-        ap_log_error(APLOG_MARK, APLOG_WARNING, rv, r->server,
+        ap_log_error(APLOG_MARK, APLOG_WARNING, apr_get_os_error(), r->server,
                      "mod_fcgid: apr_brigade_create failed in handle_request function");
         return HTTP_INTERNAL_SERVER_ERROR;
     }
@@ -562,7 +562,7 @@
 
             request_size += len;
             if (request_size > max_request_len) {
-                ap_log_error(APLOG_MARK, APLOG_WARNING, apr_get_os_error(),
+                ap_log_error(APLOG_MARK, APLOG_WARNING, 0,
                              main_server,
                              "mod_fcgid: http request length %" APR_SIZE_T_FMT " > %"
APR_SIZE_T_FMT,
                              request_size, max_request_len);
@@ -586,8 +586,7 @@
 
                     rv = apr_temp_dir_get(&tempdir, r->pool);
                     if (rv != APR_SUCCESS) {
-                        ap_log_error(APLOG_MARK, APLOG_WARNING,
-                                     apr_get_os_error(), main_server,
+                        ap_log_error(APLOG_MARK, APLOG_WARNING, rv, main_server,
                                      "mod_fcigd: can't get tmp dir");
                         return HTTP_INTERNAL_SERVER_ERROR;
                     }
@@ -598,8 +597,7 @@
                     rv = apr_file_mktemp(&fd, template, 0,
                                          r->connection->pool);
                     if (rv != APR_SUCCESS) {
-                        ap_log_error(APLOG_MARK, APLOG_WARNING,
-                                     apr_get_os_error(), main_server,
+                        ap_log_error(APLOG_MARK, APLOG_WARNING, rv, main_server,
                                      "mod_fcgid: can't open tmp file fot stdin request");
                         return HTTP_INTERNAL_SERVER_ERROR;
                     }
@@ -617,7 +615,7 @@
                                          &wrote_len)) != APR_SUCCESS
                     || len != wrote_len) {
                     ap_log_error(APLOG_MARK, APLOG_WARNING,
-                                 apr_get_os_error(), main_server,
+                                 rv, main_server,
                                  "mod_fcgid: can't write tmp file for stdin request");
                     return HTTP_INTERNAL_SERVER_ERROR;
                 }

Modified: httpd/mod_fcgid/trunk/modules/fcgid/fcgid_pm_main.c
URL: http://svn.apache.org/viewvc/httpd/mod_fcgid/trunk/modules/fcgid/fcgid_pm_main.c?rev=813521&r1=813520&r2=813521&view=diff
==============================================================================
--- httpd/mod_fcgid/trunk/modules/fcgid/fcgid_pm_main.c (original)
+++ httpd/mod_fcgid/trunk/modules/fcgid/fcgid_pm_main.c Thu Sep 10 17:33:32 2009
@@ -500,7 +500,7 @@
     procinfo.uid = command->uid;
     procinfo.gid = command->gid;
     procinfo.userdir = command->userdir;
-    if (apr_pool_create(&procnode->proc_pool, configpool) != APR_SUCCESS
+    if ((rv = apr_pool_create(&procnode->proc_pool, configpool)) != APR_SUCCESS
         || (procinfo.proc_environ =
             apr_table_make(procnode->proc_pool, INITENV_CNT)) == NULL) {
         /* Link the node back to free list in this case */
@@ -509,7 +509,7 @@
         link_node_to_list(main_server, free_list_header, procnode,
                           proctable_array);
 
-        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, main_server,
+        ap_log_error(APLOG_MARK, APLOG_WARNING, rv, main_server,
                      "mod_fcgid: can't create pool for process");
         return;
     }

Modified: httpd/mod_fcgid/trunk/modules/fcgid/fcgid_pm_unix.c
URL: http://svn.apache.org/viewvc/httpd/mod_fcgid/trunk/modules/fcgid/fcgid_pm_unix.c?rev=813521&r1=813520&r2=813521&view=diff
==============================================================================
--- httpd/mod_fcgid/trunk/modules/fcgid/fcgid_pm_unix.c (original)
+++ httpd/mod_fcgid/trunk/modules/fcgid/fcgid_pm_unix.c Thu Sep 10 17:33:32 2009
@@ -239,7 +239,7 @@
                      "mod_fcgid: Process manager %d started", getpid());
 
         if ((rv = init_signal(main_server)) != APR_SUCCESS) {
-            ap_log_error(APLOG_MARK, LOG_EMERG, rv, main_server,
+            ap_log_error(APLOG_MARK, LOG_EMERG, 0, main_server,
                          "mod_fcgid: can't intall signal handler, exit now");
             exit(1);
         }
@@ -247,7 +247,7 @@
         /* if running as root, switch to configured user */
         if (ap_unixd_config.suexec_enabled) {
             if (getuid() != 0) {
-                ap_log_error(APLOG_MARK, LOG_EMERG, rv, main_server,
+                ap_log_error(APLOG_MARK, LOG_EMERG, 0, main_server,
                              "mod_fcgid: current user is not root while suexec is enabled,
exit now");
                 exit(1);
             }
@@ -268,7 +268,7 @@
                      "mod_fcgid: Process manager %d stopped", getpid());
         exit(0);
     } else if (rv != APR_INPARENT) {
-        ap_log_error(APLOG_MARK, APLOG_EMERG, errno, main_server,
+        ap_log_error(APLOG_MARK, APLOG_EMERG, rv, main_server,
                      "mod_fcgid: Create process manager error");
         exit(1);
     }

Modified: httpd/mod_fcgid/trunk/modules/fcgid/fcgid_pm_win.c
URL: http://svn.apache.org/viewvc/httpd/mod_fcgid/trunk/modules/fcgid/fcgid_pm_win.c?rev=813521&r1=813520&r2=813521&view=diff
==============================================================================
--- httpd/mod_fcgid/trunk/modules/fcgid/fcgid_pm_win.c (original)
+++ httpd/mod_fcgid/trunk/modules/fcgid/fcgid_pm_win.c Thu Sep 10 17:33:32 2009
@@ -219,7 +219,7 @@
         }
 
         /* Release the lock now */
-        if (apr_thread_mutex_unlock(g_reqlock) != APR_SUCCESS) {
+        if ((rv = apr_thread_mutex_unlock(g_reqlock)) != APR_SUCCESS) {
             /* It's a fatal error */
             ap_log_error(APLOG_MARK, APLOG_EMERG, rv, main_server,
                          "mod_fcgid: can't release request lock");

Modified: httpd/mod_fcgid/trunk/modules/fcgid/fcgid_proc_unix.c
URL: http://svn.apache.org/viewvc/httpd/mod_fcgid/trunk/modules/fcgid/fcgid_proc_unix.c?rev=813521&r1=813520&r2=813521&view=diff
==============================================================================
--- httpd/mod_fcgid/trunk/modules/fcgid/fcgid_proc_unix.c (original)
+++ httpd/mod_fcgid/trunk/modules/fcgid/fcgid_proc_unix.c Thu Sep 10 17:33:32 2009
@@ -204,17 +204,24 @@
 
     /* Initialize the variables */
     if (!g_inode_cginame_map) {
-        apr_pool_create(&g_inode_cginame_map,
-                        procinfo->main_server->process->pconf);
+        rv = apr_pool_create(&g_inode_cginame_map,
+                             procinfo->main_server->process->pconf);
+        if (rv != APR_SUCCESS) {
+            ap_log_error(APLOG_MARK, APLOG_WARNING, rv,
+                         procinfo->main_server,
+                         "mod_fcgid: can't cgi name map table");
+            return APR_ENOMEM;
+        }
     }
 
-    if (!g_socket_dir)
+    if (!g_socket_dir) {
         g_socket_dir = get_socketpath(procinfo->main_server);
-    if (!g_inode_cginame_map || !g_socket_dir) {
-        ap_log_error(APLOG_MARK, APLOG_WARNING, apr_get_os_error(),
-                     procinfo->main_server,
-                     "mod_fcgid: can't cgi name map table");
-        return APR_ENOMEM;
+        if (!g_socket_dir) {
+            ap_log_error(APLOG_MARK, APLOG_WARNING, apr_get_os_error(),
+                         procinfo->main_server,
+                         "mod_fcgid: can't get socket path");
+            return APR_ENOMEM;
+        }
     }
 
     /* 

Modified: httpd/mod_fcgid/trunk/modules/fcgid/fcgid_proc_win.c
URL: http://svn.apache.org/viewvc/httpd/mod_fcgid/trunk/modules/fcgid/fcgid_proc_win.c?rev=813521&r1=813520&r2=813521&view=diff
==============================================================================
--- httpd/mod_fcgid/trunk/modules/fcgid/fcgid_proc_win.c (original)
+++ httpd/mod_fcgid/trunk/modules/fcgid/fcgid_proc_win.c Thu Sep 10 17:33:32 2009
@@ -93,14 +93,15 @@
     memset(&SecurityAttributes, 0, sizeof(SecurityAttributes));
 
     /* Create the pool if necessary */
-    if (!g_inode_cginame_map)
-        apr_pool_create(&g_inode_cginame_map,
-                        procinfo->main_server->process->pconf);
     if (!g_inode_cginame_map) {
-        ap_log_error(APLOG_MARK, APLOG_WARNING, apr_get_os_error(),
-                     procinfo->main_server,
-                     "mod_fcgid: can't cgi name map table");
-        return APR_ENOMEM;
+        rv = apr_pool_create(&g_inode_cginame_map,
+                             procinfo->main_server->process->pconf);
+        if (rv != APR_SUCCESS) {
+            ap_log_error(APLOG_MARK, APLOG_WARNING, rv,
+                         procinfo->main_server,
+                         "mod_fcgid: can't cgi name map table");
+            return APR_ENOMEM;
+        }
     }
 
     /* Prepare finish event */



Mime
View raw message