add rpc update interface
This commit is contained in:
parent
ad5639df89
commit
bc27d245b1
|
@ -162,6 +162,7 @@ int rpcSendRequestWithCtx(void *thandle, const SEpSet *pEpSet, SRpcMsg *pMsg,
|
|||
int rpcSendRecv(void *shandle, SEpSet *pEpSet, SRpcMsg *pReq, SRpcMsg *pRsp);
|
||||
int rpcSetDefaultAddr(void *thandle, const char *ip, const char *fqdn);
|
||||
void *rpcAllocHandle();
|
||||
void rpcSetIpWhite(void *thandl, void *arg);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -63,6 +63,12 @@ static void dmConvertErrCode(tmsg_t msgType) {
|
|||
terrno = TSDB_CODE_VND_STOPPED;
|
||||
}
|
||||
}
|
||||
static void dmUpdateRpcIpWhite(SRpcMsg *pRpc) {
|
||||
SUpdateIpWhite ipWhite;
|
||||
tDeserializeSUpdateIpWhite(pRpc->pCont, pRpc->contLen, &ipWhite);
|
||||
|
||||
tFreeSUpdateIpWhiteReq(&ipWhite);
|
||||
}
|
||||
static void dmProcessRpcMsg(SDnode *pDnode, SRpcMsg *pRpc, SEpSet *pEpSet) {
|
||||
SDnodeTrans *pTrans = &pDnode->trans;
|
||||
int32_t code = -1;
|
||||
|
@ -96,7 +102,9 @@ static void dmProcessRpcMsg(SDnode *pDnode, SRpcMsg *pRpc, SEpSet *pEpSet) {
|
|||
if (pEpSet != NULL) {
|
||||
dmSetMnodeEpSet(&pDnode->data, pEpSet);
|
||||
}
|
||||
break;
|
||||
case TDMT_MND_RETRIEVE_IP_WHITE_RSP: {
|
||||
dmUpdateRpcIpWhite(pRpc);
|
||||
} break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -29,6 +29,8 @@ extern "C" {
|
|||
#include "ttrace.h"
|
||||
#include "tutil.h"
|
||||
|
||||
typedef bool (*FilteFunc)(void* arg);
|
||||
|
||||
typedef void* queue[2];
|
||||
/* Private macros. */
|
||||
#define QUEUE_NEXT(q) (*(queue**)&((*(q))[0]))
|
||||
|
|
|
@ -183,6 +183,8 @@ int rpcSetDefaultAddr(void* thandle, const char* ip, const char* fqdn) {
|
|||
return transSetDefaultAddr(thandle, ip, fqdn);
|
||||
}
|
||||
|
||||
void rpcSetIpWhite(void* thandl, void* arg) { return ; }
|
||||
|
||||
void* rpcAllocHandle() { return (void*)transAllocHandle(); }
|
||||
|
||||
int32_t rpcInit() {
|
||||
|
|
|
@ -18,7 +18,6 @@ static TdThreadOnce transModuleInit = PTHREAD_ONCE_INIT;
|
|||
|
||||
static char* notify = "a";
|
||||
|
||||
typedef bool (*FilteFunc)(void* arg);
|
||||
typedef struct {
|
||||
int notifyCount; //
|
||||
int init; // init or not
|
||||
|
|
Loading…
Reference in New Issue