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
external
sofia-sip
Commits
b57b4816
Commit
b57b4816
authored
Jan 14, 2006
by
Martti Mela
Browse files
stun, contnd.
darcs-hash:20060114140750-1b897-838ac261e5c51b3cb1f9214b84d2a20d7bcef4a6.gz
parent
883ff49c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
9 deletions
+3
-9
libsofia-sip-ua/stun/stun.c
libsofia-sip-ua/stun/stun.c
+3
-9
No files found.
libsofia-sip-ua/stun/stun.c
View file @
b57b4816
...
...
@@ -655,7 +655,7 @@ static int get_localinfo(su_localinfo_t *clientinfo)
int
i
,
error
,
found
=
0
;
char
ipaddr
[
SU_ADDRSIZE
+
2
]
=
{
0
};
hints
->
li_family
=
AF_INET
;
/*
hints->li_family = AF_INET;
*/
if
((
error
=
su_getlocalinfo
(
hints
,
&
res
))
==
0
)
{
/* try to bind to the first available address */
...
...
@@ -664,6 +664,7 @@ static int get_localinfo(su_localinfo_t *clientinfo)
continue
;
clientinfo
->
li_family
=
li
->
li_family
;
clientinfo
->
li_addrlen
=
li
->
li_addrlen
;
sa
=
clientinfo
->
li_addr
;
memcpy
(
sa
,
li
->
li_addr
,
sizeof
(
su_addrinfo_t
));
...
...
@@ -780,14 +781,7 @@ int stun_handle_bind(stun_handle_t *sh,
/* Not bound - bind it */
get_localinfo
(
clientinfo
);
if
(
bind_addr
.
su_family
==
AF_INET
)
clientinfo
->
li_addrlen
=
16
;
else
clientinfo
->
li_addrlen
=
32
;
clientinfo
->
li_addrlen
=
bind_len
;
if
(
err
=
bind
(
s
,
(
struct
sockaddr
*
)
&
clientinfo
->
li_addr
,
clientinfo
->
li_addrlen
)
<
0
)
{
if
(
err
=
bind
(
s
,
(
struct
sockaddr
*
)
&
clientinfo
->
li_addr
,
bind_len
)
<
0
)
{
STUN_ERROR
(
errno
,
bind
);
SU_DEBUG_3
((
"%s: Error binding to %s:%u
\n
"
,
__func__
,
inet_ntop
(
clientinfo
->
li_family
,
SU_ADDR
(
clientinfo
->
li_addr
),
...
...
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