TS-3231: mark proxy.config.body_factory.template_sets_dir reloadable

The body factory templates are reloaded in HttpBodyFactory::reconfigure()
so mark them as RECU_DYNAMIC so we don't think that we need to
restart on every reconfiguration event.


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/bce3e2d8
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/bce3e2d8
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/bce3e2d8

Branch: refs/heads/master
Commit: bce3e2d8b7ac9f5c96c40da395d86100bb44079d
Parents: f8be368
Author: James Peach <[email protected]>
Authored: Mon Nov 17 16:42:54 2014 -0800
Committer: James Peach <[email protected]>
Committed: Tue Dec 9 13:48:51 2014 -0800

----------------------------------------------------------------------
 mgmt/RecordsConfig.cc         | 2 +-
 proxy/http/HttpBodyFactory.cc | 2 +-
 proxy/http/HttpConfig.h       | 4 ----
 3 files changed, 2 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/bce3e2d8/mgmt/RecordsConfig.cc
----------------------------------------------------------------------
diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc
index 3fbbfdd..d48bfcc 100644
--- a/mgmt/RecordsConfig.cc
+++ b/mgmt/RecordsConfig.cc
@@ -711,7 +711,7 @@ static const RecordElement RecordsConfig[] =
   ,
   {RECT_CONFIG, "proxy.config.body_factory.enable_logging", RECD_INT, "0", 
RECU_RESTART_TS, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.body_factory.template_sets_dir", RECD_STRING, 
TS_BUILD_SYSCONFDIR "/body_factory", RECU_RESTART_TS, RR_NULL, RECC_STR, 
"^[^[:space:]]+$", RECA_NULL}
+  {RECT_CONFIG, "proxy.config.body_factory.template_sets_dir", RECD_STRING, 
TS_BUILD_SYSCONFDIR "/body_factory", RECU_DYNAMIC, RR_NULL, RECC_STR, 
"^[^[:space:]]+$", RECA_NULL}
   ,
   //# 0 - never suppress generated responses
   //# 1 - always suppress generated responses

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/bce3e2d8/proxy/http/HttpBodyFactory.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpBodyFactory.cc b/proxy/http/HttpBodyFactory.cc
index 33e273e..05e774b 100644
--- a/proxy/http/HttpBodyFactory.cc
+++ b/proxy/http/HttpBodyFactory.cc
@@ -371,7 +371,7 @@ HttpBodyFactory::HttpBodyFactory()
 
   no_registrations_failed = true;
   for (i = 0; config_record_names[i] != NULL; i++) {
-    status = HTTP_RegisterConfigUpdateFunc(config_record_names[i], 
config_callback, (void *) this);
+    status = REC_RegisterConfigUpdateFunc(config_record_names[i], 
config_callback, (void *) this);
     if (status != REC_ERR_OKAY) {
       Warning("couldn't register variable '%s', is records.config up to 
date?", config_record_names[i]);
     }

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/bce3e2d8/proxy/http/HttpConfig.h
----------------------------------------------------------------------
diff --git a/proxy/http/HttpConfig.h b/proxy/http/HttpConfig.h
index 81ed6cd..dcc98f7 100644
--- a/proxy/http/HttpConfig.h
+++ b/proxy/http/HttpConfig.h
@@ -355,10 +355,6 @@ do { \
 #define HTTP_READ_DYN_SUM(x, S) RecGetRawStatSum(http_rsb, (int)x, &S) // This 
aggregates threads too
 #define HTTP_READ_GLOBAL_DYN_SUM(x, S) RecGetGlobalRawStatSum(http_rsb, 
(int)x, &S)
 
-#define HTTP_ConfigReadInteger         REC_ConfigReadInteger
-#define HTTP_ConfigReadString          REC_ConfigReadString
-#define HTTP_RegisterConfigUpdateFunc  REC_RegisterConfigUpdateFunc
-
 /////////////////////////////////////////////////////////////
 //
 // struct HttpConfigPortRange

Reply via email to