add func conn_pool_compare_ip_and_port
parent
a749b84ce2
commit
130d7fe110
2
HISTORY
2
HISTORY
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
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
|
||||
|
|
|
|||
Loading…
Reference in New Issue