提交 130d7fe1 编写于 作者: Y YuQing

add func conn_pool_compare_ip_and_port

上级 a749b84c
Version 1.44 2020-09-06
Version 1.44 2020-09-08
* add test file src/tests/test_pthread_lock.c
* add uniq_skiplist.[hc]
* add function split_string_ex
......
......@@ -305,6 +305,16 @@ static inline void conn_pool_set_server_info(ConnectionInfo *pServerInfo,
pServerInfo->sock = -1;
}
static inline int conn_pool_compare_ip_and_port(const char *ip1,
const short port1, const char *ip2, const short port2)
{
int result;
if ((result=strcmp(ip1, ip2)) != 0) {
return result;
}
return port1 - port2;
}
#ifdef __cplusplus
}
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册