httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r167965 - /httpd/httpd/trunk/server/config.c
Date Tue, 03 May 2005 19:41:04 GMT
Author: jorton
Date: Tue May  3 12:41:02 2005
New Revision: 167965

URL: http://svn.apache.org/viewcvs?rev=167965&view=rev
Log:
* server/config.c (process_resource_config_nofnmatch): Fail with
useful error message if the config file can't be opened.

Modified:
    httpd/httpd/trunk/server/config.c

Modified: httpd/httpd/trunk/server/config.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/server/config.c?rev=167965&r1=167964&r2=167965&view=diff
==============================================================================
--- httpd/httpd/trunk/server/config.c (original)
+++ httpd/httpd/trunk/server/config.c Tue May  3 12:41:02 2005
@@ -1429,6 +1429,7 @@
     cmd_parms parms;
     ap_configfile_t *cfp;
     const char *error;
+    apr_status_t rv;
 
     if (ap_is_directory(p, fname)) {
         apr_dir_t *dirp;
@@ -1436,7 +1437,6 @@
         int current;
         apr_array_header_t *candidates = NULL;
         fnames *fnew;
-        apr_status_t rv;
         char *path = apr_pstrdup(p, fname);
 
         if (++depth > AP_MAX_INCLUDE_DIR_DEPTH) {
@@ -1499,9 +1499,11 @@
     parms.override = (RSRC_CONF | OR_ALL) & ~(OR_AUTHCFG | OR_LIMIT);
     parms.override_opts = OPT_ALL | OPT_INCNOEXEC | OPT_SYM_OWNER | OPT_MULTI;
 
-    if (ap_pcfg_openfile(&cfp, p, fname) != APR_SUCCESS) {
-        return apr_pstrcat(p, "Could not open document config file ",
-                           fname, NULL);
+    rv = ap_pcfg_openfile(&cfp, p, fname); 
+    if (rv != APR_SUCCESS) {
+        char errmsg[120];
+        return apr_psprintf(p, "Could not open configuration file %s: %s",
+                            fname, apr_strerror(rv, errmsg, sizeof errmsg));
     }
 
     parms.config_file = cfp;



Mime
View raw message