update src/host/translate.cpp.

Signed-off-by: liupeng298 <liupeng298@huawei.com>
This commit is contained in:
liupeng298 2024-07-31 12:25:48 +00:00 committed by Gitee
parent 363cd140d0
commit 8dc7573413
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -230,7 +230,8 @@ namespace TranslateCommand {
const char *pExtra = input + 6; // CMDSTR_FORWARD_FPORT CMDSTR_FORWARD_RPORT + " " size
if (!strncmp(input, CMDSTR_FORWARD_FPORT.c_str(), CMDSTR_FORWARD_FPORT.size()) && !strcmp(pExtra, "ls")) {
outCmd->cmdFlag = CMD_FORWARD_LIST;
} else if (!strncmp(input, CMDSTR_FORWARD_FPORT.c_str(), CMDSTR_FORWARD_FPORT.size()) && !strncmp(pExtra, "rm", 2)) { // 2: "rm" size
} else if (!strncmp(input, CMDSTR_FORWARD_FPORT.c_str(), CMDSTR_FORWARD_FPORT.size()) &&
!strncmp(pExtra, "rm", 2)) { // 2: "rm" size
outCmd->cmdFlag = CMD_FORWARD_REMOVE;
if (strcmp(pExtra, "rm")) {
outCmd->parameters = input + FORWORD_PORT_RM_BUF_SIZE;