diff --git a/HISTORY b/HISTORY index d949ed9..aa33420 100644 --- a/HISTORY +++ b/HISTORY @@ -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 diff --git a/tracker/tracker_service.c b/tracker/tracker_service.c index 9ce5a35..0a541d5 100644 --- a/tracker/tracker_service.c +++ b/tracker/tracker_service.c @@ -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", \