configure android resolver with what is accessible in bionic

This commit is contained in:
Simon Morlat 2010-10-28 11:34:16 +02:00
parent 740dbb9041
commit 950ab0eb43

View file

@ -779,10 +779,19 @@ int linphone_core_get_local_ip_for(int type, const char *dest, char *result){
#ifndef WIN32
#include <resolv.h>
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