From 950ab0eb432aa9938ccedf78a1b2970d0b05ee81 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Thu, 28 Oct 2010 11:34:16 +0200 Subject: [PATCH] configure android resolver with what is accessible in bionic --- coreapi/misc.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/coreapi/misc.c b/coreapi/misc.c index 84ddac599..1dc3b7e70 100644 --- a/coreapi/misc.c +++ b/coreapi/misc.c @@ -779,10 +779,19 @@ int linphone_core_get_local_ip_for(int type, const char *dest, char *result){ #ifndef WIN32 #include + + + void _linphone_core_configure_resolver(){ +/*bionic declares _res but does not define nor export it !!*/ +#ifdef ANDROID + /*timeout and attempts are the same as retrans and retry, but are android specific names.*/ + setenv("RES_OPTIONS","timeout:1 attempts:2 retrans:1 retry:2",1); +#else res_init(); _res.retrans=1; /*retransmit every second*/ _res.retry=2; /*only two times per DNS server*/ +#endif } #else