Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
BC
public
external
sofia-sip
Commits
a99b402f
Commit
a99b402f
authored
Jan 15, 2006
by
Martti Mela
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stun, tport, random fixes.
darcs-hash:20060115153024-1b897-4dc65704df36b410cb7a8cecb412477333c90b68.gz
parent
ba36e51d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
libsofia-sip-ua/tport/tport.c
libsofia-sip-ua/tport/tport.c
+10
-3
No files found.
libsofia-sip-ua/tport/tport.c
View file @
a99b402f
...
...
@@ -6876,9 +6876,10 @@ void tport_stun_cb(tport_master_t *mr, stun_handle_t *sh,
sa
=
stun_discovery_get_address
(
sd
);
memcpy
(
&
mr
->
mr_nat
->
sockaddr
,
sa
,
sizeof
(
su_sockaddr_t
));
SU_DEBUG_0
((
"%s: local address NATed as %s:%u
\n
"
,
__func__
,
inet_ntop
(
sa
->
su_family
,
SU_ADDR
(
sa
),
inet_ntop
(
mr
->
mr_nat
->
sockaddr
.
su_family
,
SU_ADDR
(
&
mr
->
mr_nat
->
sockaddr
),
ipaddr
,
sizeof
(
ipaddr
)),
(
unsigned
)
ntohs
(
sa
->
su_port
)));
(
unsigned
)
ntohs
(
mr
->
mr_nat
->
sockaddr
.
su_port
)));
mr
->
mr_stun_step_ready
=
1
;
break
;
...
...
@@ -6991,6 +6992,7 @@ int tport_nat_stun_bind(struct tport_nat_s *nat,
su_socket_t
s
)
{
int
nat_bound
=
0
;
char
ipaddr
[
SU_ADDRSIZE
+
2
]
=
{
0
};
/* nat->stun_socket = stun_socket_create(nat->stun, s); */
tport_master_t
*
mr
=
nat
->
tport
;
...
...
@@ -7009,7 +7011,12 @@ int tport_nat_stun_bind(struct tport_nat_s *nat,
stun_handle_release
(
nat
->
stun
,
s
);
SU_DEBUG_9
((
"%s: stun_bind() ok
\n
"
,
__func__
));
memcpy
(
su
,
&
nat
->
sockaddr
,
sizeof
(
su
));
memcpy
(
su
,
&
nat
->
sockaddr
,
sizeof
(
su_sockaddr_t
));
*
sulen
=
sizeof
(
struct
sockaddr_in
);
SU_DEBUG_0
((
"%s: local address copied as %s:%u
\n
"
,
__func__
,
inet_ntop
(
su
->
su_family
,
SU_ADDR
(
su
),
ipaddr
,
sizeof
(
ipaddr
)),
(
unsigned
)
ntohs
(
su
->
su_port
)));
nat
->
stun_enabled
=
1
;
nat_bound
=
1
;
...
...
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