已合并
ICSL test status board warning #2513
jingjing3434创建于 7 天前
ICSL test status board warning #2513
已合并
共 4 个文件变更+15-3
| @@ -579,6 +579,7 @@ bool HdcDaemon::HandConnectValidationPubkey(HSession hSession, const uint32_t ch | |||
| 579 | WRITE_LOG(LOG_FATAL, "%s", notifymsg.c_str()); | 579 | WRITE_LOG(LOG_FATAL, "%s", notifymsg.c_str()); |
| 580 | HandleAuthFailed(handshake, channelId, hSession, notifymsg); | 580 | HandleAuthFailed(handshake, channelId, hSession, notifymsg); |
| 581 | LogMsg(hSession->sessionId, channelId, MSG_INFO, "Please remove public key and private key, then try again"); | 581 | LogMsg(hSession->sessionId, channelId, MSG_INFO, "Please remove public key and private key, then try again"); |
| 582 | + return false; | ||
| 582 | } | 583 | } |
| 583 | return true; | 584 | return true; |
| 584 | } | 585 | } |
| @@ -914,9 +914,13 @@ void HdcClient::BindLocalStd(HChannel hChannel) | |||
| 914 | 914 | ||
| 915 | 915 | ||
| 916 | WRITE_LOG(LOG_DEBUG, "setup stdio TTY mode"); | 916 | WRITE_LOG(LOG_DEBUG, "setup stdio TTY mode"); |
| 917 | - if (uv_tty_init(loopMain, &hChannel->stdoutTty, STDOUT_FILENO, 0) | 917 | + if (uv_tty_init(loopMain, &hChannel->stdoutTty, STDOUT_FILENO, 0) != 0) { |
| 918 | - || uv_tty_init(loopMain, &hChannel->stdinTty, STDIN_FILENO, 1)) { | 918 | + WRITE_LOG(LOG_DEBUG, "uv_tty_init stdout failed"); |
| 919 | - WRITE_LOG(LOG_DEBUG, "uv_tty_init failed"); | 919 | + return; |
| 920 | + } | ||
| 921 | + if (uv_tty_init(loopMain, &hChannel->stdinTty, STDIN_FILENO, 1) != 0) { | ||
| 922 | + WRITE_LOG(LOG_DEBUG, "uv_tty_init stdin failed"); | ||
| 923 | + uv_close((uv_handle_t *)&hChannel->stdoutTty, nullptr); | ||
| 920 | return; | 924 | return; |
| 921 | } | 925 | } |
| 922 | hChannel->stdoutTty.data = hChannel; | 926 | hChannel->stdoutTty.data = hChannel; |
| @@ -160,6 +160,10 @@ void HdcHostApp::CheckMaster(CtxFile *context) | |||
| 160 | 160 | ||
| 161 | bool HdcHostApp::CheckInstallContinue(AppModType mode, const char *msg) | 161 | bool HdcHostApp::CheckInstallContinue(AppModType mode, const char *msg) |
| 162 | { | 162 | { |
| 163 | + if (msg == nullptr) { | ||
| 164 | + WRITE_LOG(LOG_FATAL, "msg is null"); | ||
| 165 | + return false; | ||
| 166 | + } | ||
| 163 | string modeDesc; | 167 | string modeDesc; |
| 164 | switch (mode) { | 168 | switch (mode) { |
| 165 | case APPMOD_INSTALL: | 169 | case APPMOD_INSTALL: |
| @@ -317,6 +317,9 @@ bool SubserverManager::IsHdcProcess(int pid) | |||
| 317 | SubserverStatus SubserverManager::CreateSubserver(const std::string& serial, const std::string& port) | 317 | SubserverStatus SubserverManager::CreateSubserver(const std::string& serial, const std::string& port) |
| 318 | { | 318 | { |
| 319 | std::string runPath = ProcessHandle::GetExecutablePath(); | 319 | std::string runPath = ProcessHandle::GetExecutablePath(); |
| 320 | + if (runPath.empty()) { | ||
| 321 | + return SubserverStatus::SUBPROCESS_FAIL; | ||
| 322 | + } | ||
| 320 | char args[BUF_SIZE_SMALL] = ""; | 323 | char args[BUF_SIZE_SMALL] = ""; |
| 321 | 324 | ||
| 322 | if (!ProcessHandle::BuildSubserverArgs(args, sizeof(args), port.c_str(), serial.c_str(), port.c_str())) { | 325 | if (!ProcessHandle::BuildSubserverArgs(args, sizeof(args), port.c_str(), serial.c_str(), port.c_str())) { |