Fix svace issues
authorCheoleun Moon <chleun.moon@samsung.com>
Thu, 9 Apr 2020 08:17:20 +0000 (17:17 +0900)
committerCheoleun Moon <chleun.moon@samsung.com>
Thu, 9 Apr 2020 08:17:20 +0000 (17:17 +0900)
src/NanCommand.cpp
src/NanServiceProvider.cpp

index 2334247631ef189c734149de53a2051565225c56..ed478842d407900d612b468c451da1f1c2cf7f9d 100644 (file)
@@ -275,7 +275,7 @@ NanDataPathEndCommand::NanDataPathEndCommand(std::shared_ptr<DataPathEndConfig>
 
 void NanDataPathEndCommand::run(NanHal *hal)
 {
-       NAN_LOGI("Run DataPathResponse command");
+       NAN_LOGI("Run DataPathEnd command");
        hal->closeDataPath(std::dynamic_pointer_cast<DataPathEndConfig>(mConfig));
 }
 
index abeb44da4c100a2d605d555298684240288be8ea..b9ef1455a4265514298c73d7b0988ceb1e86b829 100644 (file)
@@ -1046,18 +1046,19 @@ void NanServiceProvider::receiveDataPathRespondResponse(NanError error)
                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);
+                       }
                }
        }