Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libnice
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
libnice
Commits
b6e22402
Commit
b6e22402
authored
Aug 05, 2008
by
Youness Alaoui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adapt libnice to new turn usage API
parent
8d92c858
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
6 deletions
+13
-6
agent/conncheck.c
agent/conncheck.c
+2
-0
agent/discovery.c
agent/discovery.c
+11
-5
agent/discovery.h
agent/discovery.h
+0
-1
No files found.
agent/conncheck.c
View file @
b6e22402
...
...
@@ -55,6 +55,8 @@
#include "conncheck.h"
#include "discovery.h"
#include "stun/usages/ice.h"
#include "stun/usages/bind.h"
#include "stun/usages/turn.h"
static
void
priv_update_check_list_failed_components
(
NiceAgent
*
agent
,
Stream
*
stream
);
static
void
priv_prune_pending_checks
(
Stream
*
stream
,
guint
component_id
);
...
...
agent/discovery.c
View file @
b6e22402
...
...
@@ -56,6 +56,8 @@
#include "agent-signals-marshal.h"
#include "component.h"
#include "discovery.h"
#include "stun/usages/bind.h"
#include "stun/usages/turn.h"
static
inline
int
priv_timer_expired
(
GTimeVal
*
restrict
timer
,
GTimeVal
*
restrict
now
)
{
...
...
@@ -274,7 +276,7 @@ NiceCandidate *discovery_add_local_host_candidate (
priv_generate_msn_credentials
(
agent
,
candidate
);
priv_assign_foundation
(
agent
,
candidate
);
/* note: candidate username and password are left NULL as stream
/* note: candidate username and password are left NULL as stream
level ufrag/password are used */
if
(
nice_udp_socket_factory_make
(
&
agent
->
udp_socket_factory
,
udp_socket
,
address
))
{
...
...
@@ -564,7 +566,7 @@ static gboolean priv_discovery_tick_unlocked (gpointer pointer)
NiceAgent
*
agent
=
pointer
;
GSList
*
i
;
int
not_done
=
0
;
/* note: track whether to continue timer */
size_t
buffer_len
;
size_t
buffer_len
=
0
;
#ifndef NDEBUG
{
...
...
@@ -606,9 +608,13 @@ static gboolean priv_discovery_tick_unlocked (gpointer pointer)
&
cand
->
stun_message
,
cand
->
stun_buffer
,
sizeof
(
cand
->
stun_buffer
));
}
else
if
(
cand
->
type
==
NICE_CANDIDATE_TYPE_RELAYED
)
{
buffer_len
=
stun_usage_turn_create
(
&
agent
->
stun_agent
,
agent
->
turn_username
,
strlen
(
agent
->
turn_username
),
agent
->
turn_password
,
strlen
(
agent
->
turn_password
),
&
cand
->
stun_message
,
cand
->
stun_buffer
,
sizeof
(
cand
->
stun_buffer
));
&
cand
->
stun_message
,
cand
->
stun_buffer
,
sizeof
(
cand
->
stun_buffer
),
NULL
,
STUN_USAGE_TURN_REQUEST_PORT_NORMAL
,
0
,
0
,
(
uint8_t
*
)
agent
->
turn_username
,
(
size_t
)
strlen
(
agent
->
turn_username
),
(
uint8_t
*
)
agent
->
turn_password
,
(
size_t
)
strlen
(
agent
->
turn_password
),
STUN_USAGE_TURN_COMPATIBILITY_GOOGLE
);
}
if
(
buffer_len
>
0
)
{
...
...
agent/discovery.h
View file @
b6e22402
...
...
@@ -38,7 +38,6 @@
/* note: this is a private header to libnice */
#include "stun/usages/bind.h"
#include "stream.h"
#include "agent.h"
...
...
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