From c7c4572c15b41a0384d7e4d2cb3723a8fcded6fb Mon Sep 17 00:00:00 2001 From: Minglei Jin Date: Fri, 25 Dec 2020 13:06:22 +0800 Subject: [PATCH] rpc: remove duplicate macro definitions --- src/rpc/inc/rpcHead.h | 1 + src/rpc/src/rpcMain.c | 7 ------- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/rpc/inc/rpcHead.h b/src/rpc/inc/rpcHead.h index 95204f72f6..dc0cac0143 100644 --- a/src/rpc/inc/rpcHead.h +++ b/src/rpc/inc/rpcHead.h @@ -20,6 +20,7 @@ extern "C" { #endif +// server:0 client:1 tcp:2 udp:0 #define RPC_CONN_UDPS 0 #define RPC_CONN_UDPC 1 #define RPC_CONN_TCPS 2 diff --git a/src/rpc/src/rpcMain.c b/src/rpc/src/rpcMain.c index 8226620c1b..deaf30f42e 100644 --- a/src/rpc/src/rpcMain.c +++ b/src/rpc/src/rpcMain.c @@ -137,13 +137,6 @@ static int tsRpcRefId = -1; static int32_t tsRpcNum = 0; //static pthread_once_t tsRpcInit = PTHREAD_ONCE_INIT; -// server:0 client:1 tcp:2 udp:0 -#define RPC_CONN_UDPS 0 -#define RPC_CONN_UDPC 1 -#define RPC_CONN_TCPS 2 -#define RPC_CONN_TCPC 3 -#define RPC_CONN_TCP 2 - void *(*taosInitConn[])(uint32_t ip, uint16_t port, char *label, int threads, void *fp, void *shandle) = { taosInitUdpConnection, taosInitUdpConnection,