From 4d964dd0c020968e0e18bca9d9b932dcc1869e4b Mon Sep 17 00:00:00 2001 From: June Tate-Gans Date: Sun, 25 Apr 2021 22:31:13 -0500 Subject: [PATCH] device: Revert another warning "fix" due to lack of sleep Totally misunderstood what I was doing here and broke stickzone additions. --- g13d/device.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/g13d/device.cc b/g13d/device.cc index 5049261..536375c 100644 --- a/g13d/device.cc +++ b/g13d/device.cc @@ -221,6 +221,7 @@ void Device::read_config_file(const std::string &filename) { std::ifstream s(filename); G13_LOG(info, "reading configuration from " << filename); + while (s.good()) { // grab a line char buf[1024]; @@ -476,7 +477,9 @@ void Device::_init_commands() { advance_ws(remainder, operation); advance_ws(remainder, zonename); - if (operation != "add") { + if (operation == "add") { + _stick.zone(zonename, true); + } else { StickZone *zone = _stick.zone(zonename); if (!zone) {