campaignd: Fix SIGINT/reload command issues with an unchanged FIFO path

This prevents campaignd from deleting the current FIFO on config reload
if the path in the config hasn't changed, and potentially losing queued
up commands.
This commit is contained in:
Ignacio R. Morelle 2015-04-23 22:40:53 -03:00
parent d313c8dfb3
commit 1b517975e2

View file

@ -164,7 +164,11 @@ int server::load_config()
// Open the control socket if enabled.
if(!cfg_["control_socket"].empty()) {
input_.reset(new input_stream(cfg_["control_socket"]));
const std::string& path = cfg_["control_socket"].str();
if(!input_.get() || input_->path() != path) {
input_.reset(new input_stream(cfg_["control_socket"]));
}
}
// Ensure the campaigns list WML exists even if empty, other functions