device: Revert another warning "fix" due to lack of sleep

Totally misunderstood what I was doing here and broke stickzone additions.
This commit is contained in:
June Tate-Gans 2021-04-25 22:31:13 -05:00
parent 390995bf03
commit 4d964dd0c0

View File

@ -221,6 +221,7 @@ void Device::read_config_file(const std::string &filename) {
std::ifstream s(filename); std::ifstream s(filename);
G13_LOG(info, "reading configuration from " << filename); G13_LOG(info, "reading configuration from " << filename);
while (s.good()) { while (s.good()) {
// grab a line // grab a line
char buf[1024]; char buf[1024];
@ -476,7 +477,9 @@ void Device::_init_commands() {
advance_ws(remainder, operation); advance_ws(remainder, operation);
advance_ws(remainder, zonename); advance_ws(remainder, zonename);
if (operation != "add") { if (operation == "add") {
_stick.zone(zonename, true);
} else {
StickZone *zone = _stick.zone(zonename); StickZone *zone = _stick.zone(zonename);
if (!zone) { if (!zone) {