From ecfff5f64d95723ed194bae09b96509aeb778159 Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Tue, 19 Mar 2013 09:56:15 +0100 Subject: [PATCH] set priority to hosts,dns in case of HAVE_RESINIT --- src/belle_sip_resolver.c | 6 +++++- src/dns.c | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/belle_sip_resolver.c b/src/belle_sip_resolver.c index b9af182d..6dafee3d 100644 --- a/src/belle_sip_resolver.c +++ b/src/belle_sip_resolver.c @@ -19,13 +19,16 @@ #include "belle_sip_resolver.h" #include - +#ifdef __APPLE__ +#include "TargetConditionals.h" +#endif #define DNS_EAGAIN EAGAIN static struct dns_resolv_conf *resconf(belle_sip_resolver_context_t *ctx) { #if !_WIN32 && !HAVE_RESINIT +/*#if !_WIN32 && (!HAVE_RESINIT || !TARGET_OS_IPHONE)*/ const char *path; #endif int error; @@ -49,6 +52,7 @@ static struct dns_resolv_conf *resconf(belle_sip_resolver_context_t *ctx) { belle_sip_error("%s dns_resconf_loadandroid error", __FUNCTION__); } #elif HAVE_RESINIT +/*#elif HAVE_RESINIT && TARGET_OS_IPHONE*/ error = dns_resconf_loadfromresolv(ctx->resconf); if (error) { belle_sip_error("%s dns_resconf_loadfromresolv error", __FUNCTION__); diff --git a/src/dns.c b/src/dns.c index f13103cd..48eda7da 100644 --- a/src/dns.c +++ b/src/dns.c @@ -4388,6 +4388,7 @@ int dns_resconf_loadfromresolv(struct dns_resolv_conf *resconf) { memcpy(&resconf->nameserver[i],&addresses[i],sizeof(union res_sockaddr_union)); } res_ndestroy(&res); + strncpy(resconf->lookup, "fcb", sizeof resconf->lookup); return i>0?0:-1; } #endif /*HAVE_RESINIT*/ -- GitLab