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
6ac8aa90
Commit
6ac8aa90
authored
Jan 30, 2015
by
Simon Morlat
Browse files
fix ipv6 resolver test on windows
parent
a97a3b32
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
src/dns.c
src/dns.c
+9
-2
tester/belle_sip_tester.c
tester/belle_sip_tester.c
+1
-1
No files found.
src/dns.c
View file @
6ac8aa90
...
...
@@ -79,6 +79,11 @@
#include <iphlpapi.h>
#pragma comment(lib, "IPHLPAPI.lib")
#endif
#ifndef IPV6_V6ONLY
#define IPV6_V6ONLY 27
#endif
#else
#include <sys/types.h>
/* FD_SETSIZE socklen_t */
#include <sys/select.h>
/* FD_ZERO FD_SET fd_set select(2) */
...
...
@@ -5709,7 +5714,8 @@ static void dns_so_destroy(struct dns_socket *);
static
struct
dns_socket
*
dns_so_init
(
struct
dns_socket
*
so
,
const
struct
sockaddr
*
local
,
int
type
,
const
struct
dns_options
*
opts
,
int
*
error
)
{
static
struct
dns_socket
so_initializer
;
static
DNSBool
initialized
=
0
;
int
value
=
0
;
if
(
!
initialized
)
{
memset
(
&
so_initializer
,
0
,
sizeof
so_initializer
);
so_initializer
.
opts
.
closefd
.
arg
=
0
;
...
...
@@ -5731,7 +5737,8 @@ static struct dns_socket *dns_so_init(struct dns_socket *so, const struct sockad
if
(
-
1
==
(
so
->
udp
=
dns_socket
((
struct
sockaddr
*
)
&
so
->
local
,
SOCK_DGRAM
,
error
)))
goto
error
;
value
=
0
;
setsockopt
(
so
->
udp
,
IPPROTO_IPV6
,
IPV6_V6ONLY
,
(
const
char
*
)
&
value
,
sizeof
(
value
));
dns_k_permutor_init
(
&
so
->
qids
,
1
,
65535
);
return
so
;
...
...
tester/belle_sip_tester.c
View file @
6ac8aa90
...
...
@@ -262,7 +262,7 @@ int belle_sip_tester_run_tests(const char *suite_name, const char *test_name) {
if
(
test_name
)
{
CU_pTest
test
=
CU_get_test_by_name
(
test_name
,
suite
);
if
(
test
==
NULL
){
fprintf
(
stderr
,
"There is no test named '%s'"
,
sui
te_name
);
fprintf
(
stderr
,
"There is no test named '%s'"
,
te
st
_name
);
exit
(
-
1
);
}
CU_run_test
(
suite
,
test
);
...
...
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