Return-Path: X-Original-To: apmail-httpd-cvs-archive@www.apache.org Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7758B9BB8 for ; Mon, 12 Mar 2012 15:45:26 +0000 (UTC) Received: (qmail 82750 invoked by uid 500); 12 Mar 2012 15:45:26 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 82692 invoked by uid 500); 12 Mar 2012 15:45:25 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 82677 invoked by uid 99); 12 Mar 2012 15:45:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Mar 2012 15:45:25 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Mar 2012 15:45:24 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 223122388C8A; Mon, 12 Mar 2012 15:45:04 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: cvs@httpd.apache.org From: jim@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120312154504.223122388C8A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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); }