Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
belle-sip
Commits
2f3e8f9b
Commit
2f3e8f9b
authored
Feb 05, 2014
by
Ghislain MARY
Browse files
Allow usage of USE_FIXED_NAMESERVERS on platforms other than Windows.
parent
87d7b23c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
8 deletions
+18
-8
src/belle_sip_resolver.c
src/belle_sip_resolver.c
+8
-3
src/dns.c
src/dns.c
+7
-5
src/dns.h
src/dns.h
+3
-0
No files found.
src/belle_sip_resolver.c
View file @
2f3e8f9b
...
...
@@ -165,17 +165,22 @@ static struct dns_resolv_conf *resconf(belle_sip_simple_resolver_context_t *ctx)
path
=
belle_sip_stack_get_dns_resolv_conf_file
(
ctx
->
base
.
stack
);
if
(
!
path
){
#ifdef _WIN32
#if defined(USE_FIXED_NAMESERVERS)
error
=
dns_resconf_load_fixed_nameservers
(
ctx
->
resconf
);
if
(
error
)
{
belle_sip_error
(
"%s dns_resconf_load_fixed_name_servers error"
,
__FUNCTION__
);
}
#elif defined(_WIN32)
error
=
dns_resconf_loadwin
(
ctx
->
resconf
);
if
(
error
)
{
belle_sip_error
(
"%s dns_resconf_loadwin error"
,
__FUNCTION__
);
}
#elif ANDROID
#elif
defined(
ANDROID
)
error
=
dns_resconf_loadandroid
(
ctx
->
resconf
);
if
(
error
)
{
belle_sip_error
(
"%s dns_resconf_loadandroid error"
,
__FUNCTION__
);
}
#elif HAVE_RESINIT
#elif
defined(
HAVE_RESINIT
)
/*#elif HAVE_RESINIT && TARGET_OS_IPHONE*/
error
=
dns_resconf_loadfromresolv
(
ctx
->
resconf
);
if
(
error
)
{
...
...
src/dns.c
View file @
2f3e8f9b
...
...
@@ -4193,9 +4193,8 @@ int dns_resconf_loadpath(struct dns_resolv_conf *resconf, const char *path) {
}
/* dns_resconf_loadpath() */
#ifdef _WIN32
int
dns_resconf_loadwin
(
struct
dns_resolv_conf
*
resconf
)
{
#if USE_FIXED_NAMESERVERS
#ifdef USE_FIXED_NAMESERVERS
int
dns_resconf_load_fixed_nameservers
(
struct
dns_resolv_conf
*
resconf
)
{
const
char
*
const
nameservers
[]
=
{
"8.8.8.8"
,
"8.8.4.4"
...
...
@@ -4208,7 +4207,11 @@ int dns_resconf_loadwin(struct dns_resolv_conf *resconf) {
}
return
error
;
#else
}
#endif
/* USE_FIXED_NAMESERVERS */
#ifdef _WIN32
int
dns_resconf_loadwin
(
struct
dns_resolv_conf
*
resconf
)
{
FIXED_INFO
*
pFixedInfo
;
ULONG
ulOutBufLen
;
DWORD
dwRetVal
;
...
...
@@ -4241,7 +4244,6 @@ int dns_resconf_loadwin(struct dns_resolv_conf *resconf) {
}
return
error
;
#endif
}
/* dns_resconf_loadwin() */
#endif
...
...
src/dns.h
View file @
2f3e8f9b
...
...
@@ -910,6 +910,9 @@ int dns_resconf_loadfile(struct dns_resolv_conf *, FILE *);
int
dns_resconf_loadpath
(
struct
dns_resolv_conf
*
,
const
char
*
);
#ifdef USE_FIXED_NAMESERVERS
int
dns_resconf_load_fixed_nameservers
(
struct
dns_resolv_conf
*
resconf
);
#endif
/* USE_FIXED_NAMESERVERS */
#ifdef _WIN32
int
dns_resconf_loadwin
(
struct
dns_resolv_conf
*
);
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment