Loading init/init.cpp +8 −6 Original line number Diff line number Diff line Loading @@ -305,9 +305,6 @@ bool HandleControlMessage(const std::string& msg, const std::string& name, pid_t process_cmdline = "unknown process"; } LOG(INFO) << "Received control message '" << msg << "' for '" << name << "' from pid: " << pid << " (" << process_cmdline << ")"; const ControlMessageFunction& function = it->second; Service* svc = nullptr; Loading @@ -320,20 +317,25 @@ bool HandleControlMessage(const std::string& msg, const std::string& name, pid_t svc = ServiceList::GetInstance().FindInterface(name); break; default: LOG(ERROR) << "Invalid function target from static map key '" << msg << "': " LOG(ERROR) << "Invalid function target from static map key ctl." << msg << ": " << static_cast<std::underlying_type<ControlTarget>::type>(function.target); return false; } if (svc == nullptr) { LOG(ERROR) << "Could not find '" << name << "' for ctl." << msg; LOG(ERROR) << "Control message: Could not find '" << name << "' for ctl." << msg << " from pid: " << pid << " (" << process_cmdline << ")"; return false; } if (auto result = function.action(svc); !result) { LOG(ERROR) << "Could not ctl." << msg << " for '" << name << "': " << result.error(); LOG(ERROR) << "Control message: Could not ctl." << msg << " for '" << name << "' from pid: " << pid << " (" << process_cmdline << "): " << result.error(); return false; } LOG(INFO) << "Control message: Processed ctl." << msg << " for '" << name << "' from pid: " << pid << " (" << process_cmdline << ")"; return true; } Loading Loading
init/init.cpp +8 −6 Original line number Diff line number Diff line Loading @@ -305,9 +305,6 @@ bool HandleControlMessage(const std::string& msg, const std::string& name, pid_t process_cmdline = "unknown process"; } LOG(INFO) << "Received control message '" << msg << "' for '" << name << "' from pid: " << pid << " (" << process_cmdline << ")"; const ControlMessageFunction& function = it->second; Service* svc = nullptr; Loading @@ -320,20 +317,25 @@ bool HandleControlMessage(const std::string& msg, const std::string& name, pid_t svc = ServiceList::GetInstance().FindInterface(name); break; default: LOG(ERROR) << "Invalid function target from static map key '" << msg << "': " LOG(ERROR) << "Invalid function target from static map key ctl." << msg << ": " << static_cast<std::underlying_type<ControlTarget>::type>(function.target); return false; } if (svc == nullptr) { LOG(ERROR) << "Could not find '" << name << "' for ctl." << msg; LOG(ERROR) << "Control message: Could not find '" << name << "' for ctl." << msg << " from pid: " << pid << " (" << process_cmdline << ")"; return false; } if (auto result = function.action(svc); !result) { LOG(ERROR) << "Could not ctl." << msg << " for '" << name << "': " << result.error(); LOG(ERROR) << "Control message: Could not ctl." << msg << " for '" << name << "' from pid: " << pid << " (" << process_cmdline << "): " << result.error(); return false; } LOG(INFO) << "Control message: Processed ctl." << msg << " for '" << name << "' from pid: " << pid << " (" << process_cmdline << ")"; return true; } Loading