mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-25 23:28:09 +00:00
configure android resolver with what is accessible in bionic
This commit is contained in:
parent
740dbb9041
commit
950ab0eb43
1 changed files with 9 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue