• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

taosdata / TDengine / #3531

19 Nov 2024 10:42AM UTC coverage: 60.213% (-0.006%) from 60.219%
#3531

push

travis-ci

web-flow
Merge pull request #28777 from taosdata/fix/3.0/TD-32366

fix:TD-32366/stmt add geometry datatype check

118529 of 252344 branches covered (46.97%)

Branch coverage included in aggregate %.

7 of 48 new or added lines in 3 files covered. (14.58%)

2282 existing lines in 115 files now uncovered.

199096 of 275161 relevant lines covered (72.36%)

6067577.83 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

85.45
/source/libs/transport/src/tmsgcb.c
1
/*
2
 * Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
3
 *
4
 * This program is free software: you can use, redistribute, and/or modify
5
 * it under the terms of the GNU Affero General Public License, version 3
6
 * or later ("AGPL"), as published by the Free Software Foundation.
7
 *
8
 * This program is distributed in the hope that it will be useful, but WITHOUT
9
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
 * FITNESS FOR A PARTICULAR PURPOSE.
11
 *
12
 * You should have received a copy of the GNU Affero General Public License
13
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14
 */
15

16
#define _DEFAULT_SOURCE
17
#include "tmsgcb.h"
18
#include "taoserror.h"
19
#include "transLog.h"
20
#include "trpc.h"
21

22
static SMsgCb defaultMsgCb;
23

24
void tmsgSetDefault(const SMsgCb* msgcb) { defaultMsgCb = *msgcb; }
7,178✔
25

26
int32_t tmsgPutToQueue(const SMsgCb* msgcb, EQueueType qtype, SRpcMsg* pMsg) {
1,334,352✔
27
  int32_t code = (*msgcb->putToQueueFp)(msgcb->mgmt, qtype, pMsg);
1,334,352✔
28
  if (code != 0) {
1,334,439✔
29
    SRpcMsg rsp = {.code = code, .info = pMsg->info};
4,758✔
30
    if (rsp.info.handle != NULL) {
4,758!
31
      tmsgSendRsp(&rsp);
×
32
    }
33
    rpcFreeCont(pMsg->pCont);
4,758✔
34
    pMsg->pCont = NULL;
4,756✔
35
  }
36
  return code;
1,334,437✔
37
}
38

39
int32_t tmsgGetQueueSize(const SMsgCb* msgcb, int32_t vgId, EQueueType qtype) {
179,550✔
40
  return (*msgcb->qsizeFp)(msgcb->mgmt, vgId, qtype);
179,550✔
41
}
42

43
int32_t tmsgSendReq(const SEpSet* epSet, SRpcMsg* pMsg) {
259,421✔
44
  int32_t code = (*defaultMsgCb.sendReqFp)(epSet, pMsg);
259,421✔
45
  if (code != 0) {
259,422✔
46
    rpcFreeCont(pMsg->pCont);
294✔
47
    pMsg->pCont = NULL;
294✔
48
  }
49
  return code;
259,422✔
50
}
51
int32_t tmsgSendSyncReq(const SEpSet* epSet, SRpcMsg* pMsg) {
815,785✔
52
  int32_t code = (*defaultMsgCb.sendSyncReqFp)(epSet, pMsg);
815,785✔
53
  if (code != 0) {
815,833!
54
    rpcFreeCont(pMsg->pCont);
×
55
    pMsg->pCont = NULL;
×
56
  }
57
  return code;
815,833✔
58
}
59

60
void tmsgSendRsp(SRpcMsg* pMsg) {
8,190,809✔
61
#if 1
62
  if (rpcSendResponse(pMsg) != 0) {
8,190,809✔
63
    tError("failed to send response");
12!
64
  }
65
#else
66
  return (*defaultMsgCb.sendRspFp)(pMsg);
67
#endif
68
}
8,193,610✔
69

70
void tmsgRegisterBrokenLinkArg(SRpcMsg* pMsg) { (*defaultMsgCb.registerBrokenLinkArgFp)(pMsg); }
2,852,068✔
71

72
void tmsgReleaseHandle(SRpcHandleInfo* pHandle, int8_t type) { (*defaultMsgCb.releaseHandleFp)(pHandle, type); }
2,848,544✔
73

74
void tmsgReportStartup(const char* name, const char* desc) { (*defaultMsgCb.reportStartupFp)(name, desc); }
110,165✔
75

76
bool tmsgUpdateDnodeInfo(int32_t* dnodeId, int64_t* clusterId, char* fqdn, uint16_t* port) {
980,615✔
77
  if (defaultMsgCb.updateDnodeInfoFp) {
980,615!
78
    return (*defaultMsgCb.updateDnodeInfoFp)(defaultMsgCb.data, dnodeId, clusterId, fqdn, port);
980,618✔
79
  } else {
UNCOV
80
    return false;
×
81
  }
82
}
83

84
void tmsgUpdateDnodeEpSet(SEpSet* epset) {
746,895✔
85
  for (int32_t i = 0; i < epset->numOfEps; ++i) {
1,660,435✔
86
    bool ret = tmsgUpdateDnodeInfo(NULL, NULL, epset->eps[i].fqdn, &epset->eps[i].port);
913,540✔
87
  }
88
}
746,895✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc