CLEANUP: resolvers: do not export resolv_purge_resolution_answer_records()

This code is dangerous enough that we certainly don't want external code
to ever approach it, let's not export unnecessary functions like this one.
It was made static and a comment was added about its purpose.
This commit is contained in:
Willy Tarreau 2021-10-19 11:16:11 +02:00
parent 2a67aa0a51
commit 2acc160c05
2 changed files with 2 additions and 2 deletions

View File

@ -48,7 +48,6 @@ int resolv_get_ip_from_response(struct resolv_response *r_res,
void **newip, short *newip_sin_family,
struct server *owner);
void resolv_purge_resolution_answer_records(struct resolv_resolution *resolution);
int resolv_link_resolution(void *requester, int requester_type, int requester_locked);
void resolv_unlink_resolution(struct resolv_requester *requester, int safe);
void resolv_detach_from_resolution_answer_items(struct resolv_resolution *res, struct resolv_requester *req, int safe);

View File

@ -1786,7 +1786,8 @@ static struct resolv_resolution *resolv_pick_resolution(struct resolvers *resolv
return res;
}
void resolv_purge_resolution_answer_records(struct resolv_resolution *resolution)
/* deletes and frees all answer_items from the resolution's answer_list */
static void resolv_purge_resolution_answer_records(struct resolv_resolution *resolution)
{
struct resolv_answer_item *item, *itemback;