httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1299718 - in /httpd/httpd/trunk: modules/cache/mod_socache_dbm.c modules/cache/mod_socache_shmcb.c modules/generators/mod_cgid.c server/mpm/prefork/prefork.c server/util_mutex.c
Date Mon, 12 Mar 2012 15:45:03 GMT
Author: jim
Date: Mon Mar 12 15:45:03 2012
New Revision: 1299718

URL: http://svn.apache.org/viewvc?rev=1299718&view=rev
Log:
Move away from DEFAULT_REL_RUNTIMEDIR and use ap_runtime_dir_relative()
API

Modified:
    httpd/httpd/trunk/modules/cache/mod_socache_dbm.c
    httpd/httpd/trunk/modules/cache/mod_socache_shmcb.c
    httpd/httpd/trunk/modules/generators/mod_cgid.c
    httpd/httpd/trunk/server/mpm/prefork/prefork.c
    httpd/httpd/trunk/server/util_mutex.c

Modified: httpd/httpd/trunk/modules/cache/mod_socache_dbm.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_socache_dbm.c?rev=1299718&r1=1299717&r2=1299718&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cache/mod_socache_dbm.c (original)
+++ httpd/httpd/trunk/modules/cache/mod_socache_dbm.c Mon Mar 12 15:45:03 2012
@@ -53,7 +53,7 @@ struct ap_socache_instance_t {
  */
 #define DBM_FILE_MODE ( APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD )
 
-#define DEFAULT_DBM_PREFIX DEFAULT_REL_RUNTIMEDIR "/socache-dbm-"
+#define DEFAULT_DBM_PREFIX "socache-dbm-"
 
 /* ### this should use apr_dbm_usednames. */
 #if !defined(DBM_FILE_SUFFIX_DIR) && !defined(DBM_FILE_SUFFIX_PAG)
@@ -127,7 +127,7 @@ static apr_status_t socache_dbm_init(ap_
         const char *path = apr_pstrcat(p, DEFAULT_DBM_PREFIX, namespace,
                                        NULL);
 
-        ctx->data_file = ap_server_root_relative(p, path);
+        ctx->data_file = ap_runtime_dir_relative(p, path);
 
         if (ctx->data_file == NULL) {
             ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(00803)

Modified: httpd/httpd/trunk/modules/cache/mod_socache_shmcb.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_socache_shmcb.c?rev=1299718&r1=1299717&r2=1299718&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cache/mod_socache_shmcb.c (original)
+++ httpd/httpd/trunk/modules/cache/mod_socache_shmcb.c Mon Mar 12 15:45:03 2012
@@ -32,7 +32,7 @@
 
 #define SHMCB_MAX_SIZE (64 * 1024 * 1024)
 
-#define DEFAULT_SHMCB_PREFIX DEFAULT_REL_RUNTIMEDIR "/socache-shmcb-"
+#define DEFAULT_SHMCB_PREFIX "socache-shmcb-"
 
 #define DEFAULT_SHMCB_SUFFIX ".cache"
 
@@ -341,7 +341,7 @@ static apr_status_t socache_shmcb_init(a
         const char *path = apr_pstrcat(p, DEFAULT_SHMCB_PREFIX, namespace,
                                        DEFAULT_SHMCB_SUFFIX, NULL);
 
-        ctx->data_file = ap_server_root_relative(p, path);
+        ctx->data_file = ap_runtime_dir_relative(p, path);
     }
 
     /* Use anonymous shm by default, fall back on name-based. */

Modified: httpd/httpd/trunk/modules/generators/mod_cgid.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/generators/mod_cgid.c?rev=1299718&r1=1299717&r2=1299718&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/generators/mod_cgid.c (original)
+++ httpd/httpd/trunk/modules/generators/mod_cgid.c Mon Mar 12 15:45:03 2012
@@ -135,7 +135,7 @@ static int is_scriptaliased(request_rec 
 
 #define DEFAULT_LOGBYTES 10385760
 #define DEFAULT_BUFBYTES 1024
-#define DEFAULT_SOCKET  DEFAULT_REL_RUNTIMEDIR "/cgisock"
+#define DEFAULT_SOCKET "cgisock"
 
 #define CGI_REQ    1
 #define SSI_REQ    2
@@ -910,6 +910,7 @@ static int cgid_init(apr_pool_t *p, apr_
         procnew->err = procnew->in = procnew->out = NULL;
         apr_pool_userdata_set((const void *)procnew, userdata_key,
                      apr_pool_cleanup_null, main_server->process->pool);
+        return ret;
     }
     else {
         procnew = data;
@@ -922,7 +923,7 @@ static int cgid_init(apr_pool_t *p, apr_
             total_modules++;
 
         parent_pid = getpid();
-        tmp_sockname = ap_server_root_relative(p, sockname);
+        tmp_sockname = ap_runtime_dir_relative(p, sockname);
         if (strlen(tmp_sockname) > sizeof(server_addr->sun_path) - 1) {
             tmp_sockname[sizeof(server_addr->sun_path)] = '\0';
             ap_log_error(APLOG_MARK, APLOG_ERR, 0, main_server, APLOGNO(01254)
@@ -1016,7 +1017,7 @@ static const char *set_script_socket(cmd
 
     /* Make sure the pid is appended to the sockname */
     sockname = ap_append_pid(cmd->pool, arg, ".");
-    sockname = ap_server_root_relative(cmd->pool, sockname);
+    sockname = ap_runtime_dir_relative(cmd->pool, sockname);
 
     if (!sockname) {
         return apr_pstrcat(cmd->pool, "Invalid ScriptSock path",

Modified: httpd/httpd/trunk/server/mpm/prefork/prefork.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/prefork/prefork.c?rev=1299718&r1=1299717&r2=1299718&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/prefork/prefork.c (original)
+++ httpd/httpd/trunk/server/mpm/prefork/prefork.c Mon Mar 12 15:45:03 2012
@@ -180,7 +180,7 @@ static void chdir_for_gprof(void)
         }
     }
     else {
-        use_dir = ap_server_root_relative(pconf, DEFAULT_REL_RUNTIMEDIR);
+        use_dir = ap_runtime_dir_relative(pconf, "");
     }
 
     chdir(use_dir);

Modified: httpd/httpd/trunk/server/util_mutex.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util_mutex.c?rev=1299718&r1=1299717&r2=1299718&view=diff
==============================================================================
--- httpd/httpd/trunk/server/util_mutex.c (original)
+++ httpd/httpd/trunk/server/util_mutex.c Mon Mar 12 15:45:03 2012
@@ -157,7 +157,7 @@ AP_DECLARE_NONSTD(void) ap_mutex_init(ap
     /* initialize default mutex configuration */
     def = apr_pcalloc(p, sizeof *def);
     def->mech = APR_LOCK_DEFAULT;
-    def->dir = DEFAULT_REL_RUNTIMEDIR;
+    def->dir = ap_runtime_dir_relative(p, "");
     apr_hash_set(mxcfg_by_type, "default", APR_HASH_KEY_STRING, def);
 }
 



Mime
View raw message