Revert "fix(custom_robot): Remove unused status variable in ServiceSwitch method"

This reverts commit 7afb7e2b77.
This commit is contained in:
2025-09-22 15:26:00 +08:00
parent de6e080dca
commit 26b9c11a25

View File

@@ -154,7 +154,8 @@ bool CustomRobot::SwitchService(const std::string& serviceName, bool enable) {
}
try {
int32_t ret = rsc_->ServiceSwitch(serviceName, enable ? 1 : 0);
int32_t status;
int32_t ret = rsc_->ServiceSwitch(serviceName, enable ? 1 : 0, status);
if (ret != 0) {
LOG_ERROR("Failed to switch service " + serviceName + ", error code: " + std::to_string(ret));
return false;