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
[3/5] git commit: TS-1619: Use ConfigScheduleUpdate in SSL
certificate update
TS-1619: Use ConfigScheduleUpdate in SSL certificate update
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/3578517a
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/3578517a
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/3578517a
Branch: refs/heads/master
Commit: 3578517ade2500682b892c0fd2703f242a91dc4b
Parents: 336db46
Author: James Peach <jp...@apache.org>
Authored: Tue Dec 11 21:00:32 2012 -0800
Committer: James Peach <jp...@apache.org>
Committed: Tue Dec 11 21:22:24 2012 -0800
----------------------------------------------------------------------
iocore/net/SSLConfig.cc | 27 ++-------------------------
1 files changed, 2 insertions(+), 25 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3578517a/iocore/net/SSLConfig.cc
----------------------------------------------------------------------
diff --git a/iocore/net/SSLConfig.cc b/iocore/net/SSLConfig.cc
index d06c510..0514a7a 100644
--- a/iocore/net/SSLConfig.cc
+++ b/iocore/net/SSLConfig.cc
@@ -239,33 +239,10 @@ SSLConfig::release(SSLConfigParams * params)
configProcessor.release(configid, params);
}
-// struct SSLCertificateUpdate
-//
-// Used to read the ssl_multicert.config file after the manager signals
-// a change
-//
-struct SSLCertificateUpdate : public Continuation
-{
- int file_update_handler(int /* etype */, void * /* data */) {
- SSLCertificateConfig::reconfigure();
- delete this;
- return EVENT_DONE;
- }
-
- SSLCertificateUpdate(ProxyMutex * m) : Continuation(m) {
- SET_HANDLER(&SSLCertificateUpdate::file_update_handler);
- }
-};
-
static int
-sslCertFile_CB(const char * name, RecDataT data_type, RecData data, void * cookie)
+sslCertFile_CB(const char * /* name */, RecDataT /* data_type */, RecData /* data */, void * /* cookie */)
{
- NOWARN_UNUSED(name);
- NOWARN_UNUSED(data_type);
- NOWARN_UNUSED(data);
- NOWARN_UNUSED(cookie);
- eventProcessor.schedule_imm(NEW(new SSLCertificateUpdate(ssl_certificate_mutex)), ET_CALL);
- return 0;
+ return ConfigScheduleUpdate<SSLCertificateConfig>(ssl_certificate_mutex);
}
void