enh/TD-31977-fix-case

This commit is contained in:
dmchen 2024-09-11 03:50:05 +00:00
parent c6d8bd7333
commit 61a1a5a2cb
2 changed files with 5 additions and 2 deletions

View File

@ -602,7 +602,7 @@ void monSendReport(SMonInfo *pMonitor) {
if (pCont != NULL) {
EHttpCompFlag flag = tsMonitor.cfg.comp ? HTTP_GZIP : HTTP_FLAT;
char tmp[100] = {0};
(void)sprintf(tmp, "%" PRId64, tGenQid64(tsMonitor.dnodeId));
(void)snprintf(tmp, 100, "%" PRId64, tGenQid64(tsMonitor.dnodeId));
uDebug("report cont with QID:%s", tmp);
if (taosSendHttpReportWithQID(tsMonitor.cfg.server, tsMonUri, tsMonitor.cfg.port, pCont, strlen(pCont), flag,
tmp) != 0) {

View File

@ -266,7 +266,10 @@ static int32_t httpCreateMsg(const char* server, const char* uri, uint16_t port,
msg->server = taosStrdup(server);
msg->uri = taosStrdup(uri);
msg->cont = taosMemoryMalloc(contLen);
if (qid != NULL) msg->qid = taosStrdup(qid);
if (qid != NULL)
msg->qid = taosStrdup(qid);
else
msg->qid = NULL;
if (msg->server == NULL || msg->uri == NULL || msg->cont == NULL) {
httpDestroyMsg(msg);
*httpMsg = NULL;