diff options
author | Deepak Kodihalli <dkodihal@in.ibm.com> | 2018-08-31 04:22:55 -0500 |
---|---|---|
committer | Deepak Kodihalli <dkodihal@in.ibm.com> | 2018-08-31 04:37:30 -0500 |
commit | 2ce7b2c37e634da4e38e63f560d04707506746a2 (patch) | |
tree | 7a12b06513f5015e98c43f6f987d7b90745cd524 /phosphor-rsyslog-config/server-conf.cpp | |
parent | 9fab279fb38ab6b391503ce89aceb917ec35efa9 (diff) | |
download | phosphor-logging-2ce7b2c37e634da4e38e63f560d04707506746a2.tar.gz phosphor-logging-2ce7b2c37e634da4e38e63f560d04707506746a2.zip |
phoshor-rsyslog-config: wrap utils::restart
Provide a virtual wrapper around utils::restart in class Server. This
allows mocking in tests.
Change-Id: I79a229eaaaa17860959b8025eb8c152362738acf
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
Diffstat (limited to 'phosphor-rsyslog-config/server-conf.cpp')
-rw-r--r-- | phosphor-rsyslog-config/server-conf.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/phosphor-rsyslog-config/server-conf.cpp b/phosphor-rsyslog-config/server-conf.cpp index 0b5bc62..4bf8c79 100644 --- a/phosphor-rsyslog-config/server-conf.cpp +++ b/phosphor-rsyslog-config/server-conf.cpp @@ -105,7 +105,7 @@ void Server::writeConfig( stream << "#*.* @@remote-host:port"; } - utils::restart(); + restart(); } bool Server::addressValid(const std::string& address) @@ -150,5 +150,10 @@ void Server::restore(const char* filePath) } } +void Server::restart() +{ + utils::restart(); +} + } // namespace rsyslog_config } // namespace phosphor |