bugfixed: parse ip and port use parseAddress instead of splitEx

pull/687/head V6.11.0
YuQing 2023-12-21 19:39:19 +08:00
parent 67af9585d8
commit de36a81893
2 changed files with 5 additions and 2 deletions

View File

@ -1,4 +1,7 @@
Version 6.12.0 2023-12-21
* bugfixed: parse ip and port use parseAddress instead of splitEx
Version 6.11.0 2023-12-10
* support IPv6, config item: address_family in tracker.conf and storage.conf
use libfastcommon V1.71 and libserverframe 1.2.1

View File

@ -663,7 +663,7 @@ static int tracker_deal_notify_next_leader(struct fast_task_info *pTask)
*(pTask->recv.ptr->data + pTask->recv.ptr->length) = '\0';
pIpAndPort = pTask->recv.ptr->data + sizeof(TrackerHeader);
if (splitEx(pIpAndPort, ':', ipAndPort, 2) != 2)
if (parseAddress(pIpAndPort, ipAndPort) != 2)
{
logError("file: "__FILE__", line: %d, " \
"client ip: %s, invalid ip and port: %s", \
@ -729,7 +729,7 @@ static int tracker_deal_commit_next_leader(struct fast_task_info *pTask)
*(pTask->recv.ptr->data + pTask->recv.ptr->length) = '\0';
pIpAndPort = pTask->recv.ptr->data + sizeof(TrackerHeader);
if (splitEx(pIpAndPort, ':', ipAndPort, 2) != 2)
if (parseAddress(pIpAndPort, ipAndPort) != 2)
{
logError("file: "__FILE__", line: %d, " \
"client ip: %s, invalid ip and port: %s", \