Commit d55353a7 authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Use our own implementation of getnameinfo().

parent 2751c8a7
......@@ -4532,7 +4532,7 @@ const char *linphone_core_get_nat_address_resolved(LinphoneCore *lc) {
return lc->net_conf.nat_address;
}
error = getnameinfo((struct sockaddr *)&ss, ss_len,
error = bctbx_getnameinfo((struct sockaddr *)&ss, ss_len,
ipstring, sizeof(ipstring), NULL, 0, NI_NUMERICHOST);
if (error) {
return lc->net_conf.nat_address;
......
......@@ -4920,7 +4920,7 @@ static void call_with_http_proxy(void) {
BC_ASSERT_PTR_NOT_NULL(res);
if (!res) goto end;
BC_ASSERT_EQUAL(err=getnameinfo(res->ai_addr, (socklen_t)res->ai_addrlen, ip, sizeof(ip)-1, NULL, 0, NI_NUMERICHOST), 0, int, "%i");
BC_ASSERT_EQUAL(err=bctbx_getnameinfo(res->ai_addr, (socklen_t)res->ai_addrlen, ip, sizeof(ip)-1, NULL, 0, NI_NUMERICHOST), 0, int, "%i");
if (err != 0){
ms_error("call_with_http_proxy(): getnameinfo() error: %s", gai_strerror(err));
goto end;
......
......@@ -102,7 +102,7 @@ LinphoneAddress * linphone_core_manager_resolve(LinphoneCoreManager *mgr, const
dest=linphone_address_new(NULL);
wait_for(mgr->lc, mgr->lc, (int*)&addrinfo, 1);
err=getnameinfo((struct sockaddr*)addrinfo->ai_addr,addrinfo->ai_addrlen,ipstring,INET6_ADDRSTRLEN,NULL,0,NI_NUMERICHOST);
err=bctbx_getnameinfo((struct sockaddr*)addrinfo->ai_addr,addrinfo->ai_addrlen,ipstring,INET6_ADDRSTRLEN,NULL,0,NI_NUMERICHOST);
if (err !=0 ){
ms_error("linphone_core_manager_resolve(): getnameinfo error %s", gai_strerror(err));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment