fix rtdata error

This commit is contained in:
lnk
2025-07-30 16:30:10 +08:00
parent 7ee93deefa
commit 7d7a89223c
4 changed files with 57 additions and 13 deletions

View File

@@ -54,6 +54,8 @@ extern void ledger(const char* terminal_id = NULL,QIODevice* outputDevice = NULL
extern void value_print(const char *variableName, QTcpSocket *clientSocket);
extern int TEST_PORT;
extern bool DEBUGOPEN;
extern void redirectErrorOutput(bool enable);
extern void redirectWarnOutput(bool enable);
extern void redirectNormalOutput(bool enable);
@@ -414,6 +416,7 @@ private:
helpText += "TEST_NUM=<num> - Set the TEST_NUM\r\n";
helpText += "TEST_TYPE=<num> - Set the TEST_TYPE 0:use ledger,1:use number\r\n";
helpText += "LOG=<bool> - Set the LOG\r\n";
helpText += "DEBUG=<bool> - Set the DEBUG\r\n";
helpText += "telnettest - Set the telnettest\r\n";
helpText += "rc - Execute rocketmq_test_rc\r\n";
helpText += "rt - Execute rocketmq_test_rt\r\n";
@@ -472,6 +475,18 @@ private:
clientSocket->write("Invalid number\r\n");
}
}
else if (cmd.startsWith("DEBUG=")) {
bool ok;
bool debugFlag = cmd.mid(6).toInt(&ok);
if (ok) {
DEBUGOPEN = debugFlag;
clientSocket->write("\r\x1B[K");
clientSocket->write("LOG updated\r\n");
} else {
clientSocket->write("\r\x1B[K");
clientSocket->write("Invalid number\r\n");
}
}
else if (cmd.startsWith("telnettest")) {
g_stopTelnetTest = false;
telnetetst(clientSocket);