From 4749e66c67d66e409238fe6b86953a3d93650593 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Thu, 25 Aug 2016 22:55:12 +0900 Subject: [PATCH] nghttpx: Disallow copying Config --- src/shrpx.cc | 2 -- src/shrpx_config.h | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/shrpx.cc b/src/shrpx.cc index ece98e36..cd36a1cf 100644 --- a/src/shrpx.cc +++ b/src/shrpx.cc @@ -1272,8 +1272,6 @@ constexpr auto DEFAULT_ACCESSLOG_FORMAT = StringRef::from_lit( namespace { void fill_default_config(Config *config) { - *config = {}; - config->num_worker = 1; config->conf_path = "/etc/nghttpx/nghttpx.conf"; config->pid = getpid(); diff --git a/src/shrpx_config.h b/src/shrpx_config.h index d0645ff3..5ad6585a 100644 --- a/src/shrpx_config.h +++ b/src/shrpx_config.h @@ -706,8 +706,14 @@ struct APIConfig { }; struct Config { + Config() = default; ~Config(); + Config(Config &&) = delete; + Config(const Config &&) = delete; + Config &operator=(Config &&) = delete; + Config &operator=(const Config &&) = delete; + HttpProxy downstream_http_proxy; HttpConfig http; Http2Config http2;