Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
libnice
libnice
Commits
08730df0
Commit
08730df0
authored
Sep 17, 2008
by
Youness Alaoui
Browse files
Give the turn agent the long term credentials flag it needs
parent
b0918b6e
Changes
3
Show whitespace changes
Inline
Side-by-side
agent/discovery.c
View file @
08730df0
...
...
@@ -438,7 +438,8 @@ discovery_add_relay_candidate (
if
(
nice_udp_turn_create_socket_full
(
&
agent
->
relay_socket_factory
,
relay_socket
,
address
,
base_socket
,
&
component
->
turn_server
,
component
->
turn_username
,
component
->
turn_password
,
priv_agent_to_udp_turn_compatibility
(
agent
)))
{
priv_agent_to_udp_turn_compatibility
(
agent
),
component
->
turn_long_term
))
{
candidate
->
sockptr
=
relay_socket
;
candidate
->
base_addr
=
base_socket
->
addr
;
...
...
udp/udp-turn.c
View file @
08730df0
...
...
@@ -244,20 +244,21 @@ nice_udp_turn_create_socket_full (
NiceAddress
*
server_addr
,
gchar
*
username
,
gchar
*
password
,
NiceUdpTurnSocketCompatibility
compatibility
)
NiceUdpTurnSocketCompatibility
compatibility
,
gboolean
long_term
)
{
turn_priv
*
priv
=
g_new0
(
turn_priv
,
1
);
if
(
compatibility
==
NICE_UDP_TURN_SOCKET_COMPATIBILITY_DRAFT9
)
{
stun_agent_init
(
&
priv
->
agent
,
STUN_ALL_KNOWN_ATTRIBUTES
,
STUN_COMPATIBILITY_3489BIS
,
STUN_AGENT_USAGE_
SHORT
_TERM_CREDENTIALS
|
STUN_AGENT_USAGE_
IGNORE
_CREDENTIALS
);
long_term
?
STUN_AGENT_USAGE_
LONG
_TERM_CREDENTIALS
:
STUN_AGENT_USAGE_
SHORT_TERM
_CREDENTIALS
);
}
else
{
stun_agent_init
(
&
priv
->
agent
,
STUN_ALL_KNOWN_ATTRIBUTES
,
STUN_COMPATIBILITY_RFC3489
,
STUN_AGENT_USAGE_
SHORT
_TERM_CREDENTIALS
|
STUN_AGENT_USAGE_
IGNORE
_CREDENTIALS
);
long_term
?
STUN_AGENT_USAGE_
LONG
_TERM_CREDENTIALS
:
STUN_AGENT_USAGE_
SHORT_TERM
_CREDENTIALS
);
}
priv
->
locked
=
FALSE
;
...
...
udp/udp-turn.h
View file @
08730df0
...
...
@@ -67,7 +67,8 @@ nice_udp_turn_create_socket_full (
NiceAddress
*
server_addr
,
gchar
*
username
,
gchar
*
password
,
NiceUdpTurnSocketCompatibility
compatibility
);
NiceUdpTurnSocketCompatibility
compatibility
,
gboolean
long_term
);
void
...
...
Write
Preview
Supports
Markdown
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