You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@apache.org on 2012/07/23 18:01:44 UTC
svn commit: r1364695 - in /httpd/httpd/trunk: CHANGES include/heartbeat.h
modules/cluster/mod_heartmonitor.c
modules/proxy/balancers/mod_lbmethod_heartbeat.c
Author: trawick
Date: Mon Jul 23 16:01:43 2012
New Revision: 1364695
URL: http://svn.apache.org/viewvc?rev=1364695&view=rev
Log:
mod_lbmethod_heartbeat, mod_heartmonitor: Respect DefaultRuntimeDir/
DEFAULT_REL_RUNTIMEDIR for the heartbeat storage file.
Modified:
httpd/httpd/trunk/CHANGES
httpd/httpd/trunk/include/heartbeat.h
httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c
httpd/httpd/trunk/modules/proxy/balancers/mod_lbmethod_heartbeat.c
Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1364695&r1=1364694&r2=1364695&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Mon Jul 23 16:01:43 2012
@@ -1,6 +1,9 @@
-*- coding: utf-8 -*-
Changes with Apache 2.5.0
+ *) mod_lbmethod_heartbeat, mod_heartmonitor: Respect DefaultRuntimeDir/
+ DEFAULT_REL_RUNTIMEDIR for the heartbeat storage file. [Jeff Trawick]
+
*) mpm_event, mpm_worker: Remain active amidst prevalent child process
resource shortages. [Jeff Trawick]
Modified: httpd/httpd/trunk/include/heartbeat.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/heartbeat.h?rev=1364695&r1=1364694&r2=1364695&view=diff
==============================================================================
--- httpd/httpd/trunk/include/heartbeat.h (original)
+++ httpd/httpd/trunk/include/heartbeat.h Mon Jul 23 16:01:43 2012
@@ -47,6 +47,11 @@ typedef struct hm_slot_server_t
int id;
} hm_slot_server_t;
+/* default name of heartbeat data file, created in the configured
+ * runtime directory when mod_slotmem_shm is not available
+ */
+#define DEFAULT_HEARTBEAT_STORAGE "hb.dat"
+
#ifdef __cplusplus
}
#endif
Modified: httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c?rev=1364695&r1=1364694&r2=1364695&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c (original)
+++ httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c Mon Jul 23 16:01:43 2012
@@ -792,7 +792,7 @@ static void *hm_create_config(apr_pool_t
hm_ctx_t *ctx = (hm_ctx_t *) apr_palloc(p, sizeof(hm_ctx_t));
ctx->active = 0;
- ctx->storage_path = ap_server_root_relative(p, "logs/hb.dat");
+ ctx->storage_path = ap_runtime_dir_relative(p, DEFAULT_HEARTBEAT_STORAGE);
/* TODO: Add directive for tuning the update interval
*/
ctx->interval = apr_time_from_sec(HM_UPDATE_SEC);
@@ -816,7 +816,7 @@ static const char *cmd_hm_storage(cmd_pa
return err;
}
- ctx->storage_path = ap_server_root_relative(p, path);
+ ctx->storage_path = ap_runtime_dir_relative(p, path);
return NULL;
}
Modified: httpd/httpd/trunk/modules/proxy/balancers/mod_lbmethod_heartbeat.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/balancers/mod_lbmethod_heartbeat.c?rev=1364695&r1=1364694&r2=1364695&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/balancers/mod_lbmethod_heartbeat.c (original)
+++ httpd/httpd/trunk/modules/proxy/balancers/mod_lbmethod_heartbeat.c Mon Jul 23 16:01:43 2012
@@ -407,7 +407,7 @@ static void *lb_hb_create_config(apr_poo
{
lb_hb_ctx_t *ctx = (lb_hb_ctx_t *) apr_palloc(p, sizeof(lb_hb_ctx_t));
- ctx->path = ap_server_root_relative(p, "logs/hb.dat");
+ ctx->path = ap_runtime_dir_relative(p, DEFAULT_HEARTBEAT_STORAGE);
return ctx;
}
@@ -442,7 +442,7 @@ static const char *cmd_lb_hb_storage(cmd
return err;
}
- ctx->path = ap_server_root_relative(p, path);
+ ctx->path = ap_runtime_dir_relative(p, path);
return NULL;
}