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
a91aec55
Commit
a91aec55
authored
Mar 28, 2006
by
Pekka Pessi
Browse files
Updated tport_stun_bind_done().
darcs-hash:20060328112907-88462-1260c3b91001adb759cdfda58a2656c8989f6e9f.gz
parent
67aad1ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
libsofia-sip-ua/tport/tport_type_stun.c
View file @
a91aec55
...
...
@@ -173,23 +173,21 @@ void tport_stun_bind_done(tport_primary_t *pri,
stun_discovery_t
*
sd
)
{
tport_t
*
self
=
pri
->
pri_primary
;
su_sockaddr_t
*
su
=
NULL
;
char
ipaddr
[
SU_ADDRSIZE
+
2
]
=
{
0
};
su_socket_t
socket
;
su_sockaddr_t
*
su
=
self
->
tp_addr
;
su_addrinfo_t
*
ai
=
self
->
tp_addrinfo
;
socket
=
stun_discovery_get_socket
(
sd
);
assert
(
pri
->
pri_primary
->
tp_socket
==
socket
);
su
=
stun_discovery_get_address
(
sd
);
if
(
su
)
{
SU_DEBUG_0
((
"%s: local address NATed as %s:%u
\n
"
,
__func__
,
inet_ntop
(
su
->
su_family
,
SU_ADDR
(
su
),
ipaddr
,
sizeof
(
ipaddr
)),
(
unsigned
)
ntohs
(
su
->
su_port
)));
SU_DEBUG_9
((
"%s: stun_bind() ok
\n
"
,
__func__
));
if
(
stun_discovery_get_address
(
sd
,
su
,
&
ai
->
ai_addrlen
)
==
0
)
{
char
ipname
[
SU_ADDRSIZE
+
2
]
=
{
0
};
ai
->
ai_addr
=
(
void
*
)
su
;
memcpy
(
self
->
tp_addr
,
su
,
self
->
tp_addrinfo
->
ai_addrlen
=
SU_ADDRLEN
(
su
));
self
->
tp_addrinfo
->
ai_addr
=
(
void
*
)
self
->
tp_addr
;
SU_DEBUG_5
((
"%s: stun_bind() ok: local address NATed as %s:%u
\n
"
,
__func__
,
inet_ntop
(
su
->
su_family
,
SU_ADDR
(
su
),
ipname
,
sizeof
(
ipname
)),
(
unsigned
)
ntohs
(
su
->
su_port
)));
}
/* Send message to calling application indicating
...
...
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