diff --git a/src/bin/parkinglot/ccsession.cc b/src/bin/parkinglot/ccsession.cc index e9ad345da9..31e0b9be5e 100644 --- a/src/bin/parkinglot/ccsession.cc +++ b/src/bin/parkinglot/ccsession.cc @@ -72,17 +72,12 @@ CommandSession::getCommand(int counter) { session_.group_sendmsg(resp, "statistics"); } } else { - cmd = data->get("command"); + cmd = data->get("zone_added"); + if (cmd != NULL) + return std::pair("addzone", cmd->string_value()); + cmd = data->get("zone_deleted"); if (cmd != NULL) { - ep = cmd->get(0); - if (ep != NULL) { - s = ep->string_value(); - if (s == "addzone" || s == "delzone") { - return std::pair(s, - cmd->get(1)->string_value()); - } - return std::pair(s, ""); - } + return std::pair("delzone", cmd->string_value()); } }