提交 30229675 编写于 作者: L lnlan

feat: getaddrinfo和freeaddrinfo已经支持,去除unsupport打印

【背景】
getaddrinfo和freeaddrinfo已经支持,去除unsupport打印
【修改方案】
getaddrinfo和freeaddrinfo已经支持,去除unsupport打印
【影响】
对现有的产品编译不会有影响。

re #I296BH
Signed-off-by: Nlanleinan <lanleinan@163.com>
Change-Id: Ia00ece3c75c8f83394fadda9c90578a937fcd786
上级 b1c8592c
#include <stdlib.h>
#include <stddef.h>
#include <netdb.h>
#include "lookup.h"
#include "lock.h"
#include <unsupported_api.h>
void freeaddrinfo(struct addrinfo *p)
{
size_t cnt;
unsupported_api(__FUNCTION__);
for (cnt=1; p->ai_next; cnt++, p=p->ai_next);
struct aibuf *b = (void *)((char *)p - offsetof(struct aibuf, ai));
b -= b->slot;
LOCK(b->lock);
if (!(b->ref -= cnt)) free(b);
else UNLOCK(b->lock);
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册