You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by jp...@apache.org on 2012/12/12 06:24:36 UTC
[4/5] git commit: TS-1619: Use ConfigurationProcessor for
ParentSelection configuration update
TS-1619: Use ConfigurationProcessor for ParentSelection configuration update
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/336db463
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/336db463
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/336db463
Branch: refs/heads/master
Commit: 336db463a6415585b6a29132da6d7a84d3b5d0fb
Parents: 7d2524e
Author: James Peach <jp...@apache.org>
Authored: Tue Dec 11 20:53:09 2012 -0800
Committer: James Peach <jp...@apache.org>
Committed: Tue Dec 11 21:22:08 2012 -0800
----------------------------------------------------------------------
proxy/ParentSelection.cc | 28 +---------------------------
1 files changed, 1 insertions(+), 27 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/336db463/proxy/ParentSelection.cc
----------------------------------------------------------------------
diff --git a/proxy/ParentSelection.cc b/proxy/ParentSelection.cc
index 616e2e1..b1ab296 100644
--- a/proxy/ParentSelection.cc
+++ b/proxy/ParentSelection.cc
@@ -850,31 +850,6 @@ ParentRecord::Print()
printf(" rr=%s direct=%s\n", ParentRRStr[round_robin], (go_direct == true) ? "true" : "false");
}
-
-// struct PA_UpdateContinuation
-//
-// Used to handle parent.conf or default parent updates after the
-// manager signals a change
-//
-struct PA_UpdateContinuation: public Continuation
-{
- int handle_event(int event, void *data)
- {
- NOWARN_UNUSED(event);
- NOWARN_UNUSED(data);
- ParentConfig::reconfigure();
- delete this;
- return EVENT_DONE;
-
- }
-
- PA_UpdateContinuation(ProxyMutex * m):Continuation(m)
- {
- SET_HANDLER(&PA_UpdateContinuation::handle_event);
- }
-};
-
-
// ParentRecord* createDefaultParent(char* val)
//
// Atttemtps to allocate and init new ParentRecord
@@ -921,8 +896,7 @@ parentSelection_CB(const char *name, RecDataT data_type, RecData data, void *coo
case PARENT_ENABLE_CB:
case PARENT_THRESHOLD_CB:
case PARENT_DNS_ONLY_CB:
- eventProcessor.schedule_imm(NEW(new PA_UpdateContinuation(reconfig_mutex)), ET_CACHE);
- break;
+ return ConfigScheduleUpdate<ParentConfig>(reconfig_mutex);
default:
ink_assert(0);
}