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
59a23cfe
Commit
59a23cfe
authored
Apr 22, 2014
by
Olivier Crête
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
discovery: Remove duplicated element between CandidateRefresh and NiceCandidate
parent
25effd7e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
14 deletions
+11
-14
agent/conncheck.c
agent/conncheck.c
+7
-8
agent/discovery.c
agent/discovery.c
+4
-4
agent/discovery.h
agent/discovery.h
+0
-2
No files found.
agent/conncheck.c
View file @
59a23cfe
...
...
@@ -798,10 +798,10 @@ static void priv_turn_allocate_refresh_tick_unlocked (CandidateRefresh *cand)
StunUsageTurnCompatibility
turn_compat
=
agent_to_turn_compatibility
(
cand
->
agent
);
username
=
(
uint8_t
*
)
cand
->
turn
->
username
;
username_len
=
(
size_t
)
strlen
(
cand
->
turn
->
username
);
password
=
(
uint8_t
*
)
cand
->
turn
->
password
;
password_len
=
(
size_t
)
strlen
(
cand
->
turn
->
password
);
username
=
(
uint8_t
*
)
cand
->
candidate
->
turn
->
username
;
username_len
=
(
size_t
)
strlen
(
cand
->
candidate
->
turn
->
username
);
password
=
(
uint8_t
*
)
cand
->
candidate
->
turn
->
password
;
password_len
=
(
size_t
)
strlen
(
cand
->
candidate
->
turn
->
password
);
if
(
turn_compat
==
STUN_USAGE_TURN_COMPATIBILITY_MSN
||
turn_compat
==
STUN_USAGE_TURN_COMPATIBILITY_OC2007
)
{
...
...
@@ -2333,9 +2333,7 @@ priv_add_new_turn_refresh (CandidateDiscovery *cdisco, NiceCandidate *relay_cand
cand
->
candidate
=
relay_cand
;
cand
->
nicesock
=
cdisco
->
nicesock
;
cand
->
relay_socket
=
relay_cand
->
sockptr
;
cand
->
server
=
cdisco
->
server
;
cand
->
turn
=
cdisco
->
turn
;
cand
->
stream
=
cdisco
->
stream
;
cand
->
component
=
cdisco
->
component
;
cand
->
agent
=
cdisco
->
agent
;
...
...
@@ -2803,9 +2801,10 @@ gboolean conn_check_handle_inbound_stun (NiceAgent *agent, Stream *stream,
for
(
i
=
agent
->
refresh_list
;
i
;
i
=
i
->
next
)
{
CandidateRefresh
*
r
=
i
->
data
;
nice_debug
(
"Comparing %p to %p, %p to %p and %p and %p to %p"
,
r
->
stream
,
stream
,
r
->
component
,
component
,
r
->
nicesock
,
r
->
relay_socket
,
nicesock
);
stream
,
r
->
component
,
component
,
r
->
nicesock
,
r
->
candidate
->
sockptr
,
nicesock
);
if
(
r
->
stream
==
stream
&&
r
->
component
==
component
&&
(
r
->
nicesock
==
nicesock
||
r
->
relay_socket
==
nicesock
))
{
(
r
->
nicesock
==
nicesock
||
r
->
candidate
->
sockptr
==
nicesock
))
{
valid
=
stun_agent_validate
(
&
r
->
stun_agent
,
&
req
,
(
uint8_t
*
)
buf
,
len
,
conncheck_stun_validater
,
&
validater_data
);
nice_debug
(
"Validating gave %d"
,
valid
);
...
...
agent/discovery.c
View file @
59a23cfe
...
...
@@ -155,10 +155,10 @@ void refresh_free_item (gpointer data, gpointer user_data)
cand
->
tick_source
=
NULL
;
}
username
=
(
uint8_t
*
)
cand
->
turn
->
username
;
username_len
=
(
size_t
)
strlen
(
cand
->
turn
->
username
);
password
=
(
uint8_t
*
)
cand
->
turn
->
password
;
password_len
=
(
size_t
)
strlen
(
cand
->
turn
->
password
);
username
=
(
uint8_t
*
)
cand
->
candidate
->
turn
->
username
;
username_len
=
(
size_t
)
strlen
(
cand
->
candidate
->
turn
->
username
);
password
=
(
uint8_t
*
)
cand
->
candidate
->
turn
->
password
;
password_len
=
(
size_t
)
strlen
(
cand
->
candidate
->
turn
->
password
);
if
(
turn_compat
==
STUN_USAGE_TURN_COMPATIBILITY_MSN
||
turn_compat
==
STUN_USAGE_TURN_COMPATIBILITY_OC2007
)
{
...
...
agent/discovery.h
View file @
59a23cfe
...
...
@@ -70,12 +70,10 @@ typedef struct
{
NiceAgent
*
agent
;
/**< back pointer to owner */
NiceSocket
*
nicesock
;
/**< existing socket to use */
NiceSocket
*
relay_socket
;
/**< relay socket from which we receive */
NiceAddress
server
;
/**< STUN/TURN server address */
NiceCandidate
*
candidate
;
/**< candidate to refresh */
Stream
*
stream
;
Component
*
component
;
TurnServer
*
turn
;
StunAgent
stun_agent
;
GSource
*
timer_source
;
GSource
*
tick_source
;
...
...
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