summaryrefslogtreecommitdiffstats
path: root/modules/generators/mod_cgid.c
diff options
context:
space:
mode:
authorJim Jagielski <jim@apache.org>2012-03-12 16:45:03 +0100
committerJim Jagielski <jim@apache.org>2012-03-12 16:45:03 +0100
commit5caa336986e7174ebf96ad1c4475cb3677841fb5 (patch)
treef7add118c0e2e45e1b7a4485533dde0395358de6 /modules/generators/mod_cgid.c
parentxform (diff)
downloadapache2-5caa336986e7174ebf96ad1c4475cb3677841fb5.tar.xz
apache2-5caa336986e7174ebf96ad1c4475cb3677841fb5.zip
Move away from DEFAULT_REL_RUNTIMEDIR and use ap_runtime_dir_relative()
API git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1299718 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/generators/mod_cgid.c')
-rw-r--r--modules/generators/mod_cgid.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/generators/mod_cgid.c b/modules/generators/mod_cgid.c
index 1e4aaf67af..7a6540168c 100644
--- a/modules/generators/mod_cgid.c
+++ b/modules/generators/mod_cgid.c
@@ -135,7 +135,7 @@ static int is_scriptaliased(request_rec *r)
#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_pool_t *plog, apr_pool_t *ptemp,
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_pool_t *plog, apr_pool_t *ptemp,
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_parms *cmd, void *dummy, const char *ar
/* 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",