void NanDataPathEndCommand::run(NanHal *hal)
{
- NAN_LOGI("Run DataPathResponse command");
+ NAN_LOGI("Run DataPathEnd command");
hal->closeDataPath(std::dynamic_pointer_cast<DataPathEndConfig>(mConfig));
}
if (error == NAN_ERROR_NONE)
error = NAN_ERROR_ABORT;
}
-
- if (error != NAN_ERROR_NONE) {
- closeDataPathInternal(info->getDataPathId());
- }
else {
- if (info->getState() != DataPathState::RESPONDER_WAIT_FOR_RESPOND_RESPONSE) {
- NAN_LOGE("Invalid state %d", info->getStateAsInt());
+ if (error != NAN_ERROR_NONE) {
closeDataPathInternal(info->getDataPathId());
- error = NAN_ERROR_ABORT;
}
else {
- info->setState(DataPathState::WAIT_FOR_CONFIRM);
+ if (info->getState() != DataPathState::RESPONDER_WAIT_FOR_RESPOND_RESPONSE) {
+ NAN_LOGE("Invalid state %d", info->getStateAsInt());
+ closeDataPathInternal(info->getDataPathId());
+ error = NAN_ERROR_ABORT;
+ }
+ else {
+ info->setState(DataPathState::WAIT_FOR_CONFIRM);
+ }
}
}