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
mediastreamer2
Commits
6104d426
Commit
6104d426
authored
Sep 25, 2012
by
Ghislain MARY
Browse files
Prevent setting USE-CANDIDATE to several candidates with the same componentID.
parent
a1776f00
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/ice.c
View file @
6104d426
...
...
@@ -121,6 +121,7 @@ static int ice_compare_pair_priorities(const IceCandidatePair *p1, const IceCand
static
int
ice_compare_pairs
(
const
IceCandidatePair
*
p1
,
const
IceCandidatePair
*
p2
);
static
int
ice_compare_candidates
(
const
IceCandidate
*
c1
,
const
IceCandidate
*
c2
);
static
int
ice_find_host_candidate
(
const
IceCandidate
*
candidate
,
const
uint16_t
*
componentID
);
static
int
ice_find_use_candidate_valid_pair_from_componentID
(
const
IceValidCandidatePair
*
valid_pair
,
const
uint16_t
*
componentID
);
static
int
ice_find_nominated_valid_pair_from_componentID
(
const
IceValidCandidatePair
*
valid_pair
,
const
uint16_t
*
componentID
);
static
int
ice_find_selected_valid_pair_from_componentID
(
const
IceValidCandidatePair
*
valid_pair
,
const
uint16_t
*
componentID
);
static
void
ice_find_selected_valid_pair_for_componentID
(
const
uint16_t
*
componentID
,
CheckList_Bool
*
cb
);
...
...
@@ -2398,8 +2399,11 @@ void ice_session_start_connectivity_checks(IceSession *session)
static
void
ice_perform_regular_nomination
(
IceValidCandidatePair
*
valid_pair
,
CheckList_RtpSession
*
cr
)
{
if
(
valid_pair
->
valid
->
use_candidate
==
FALSE
)
{
valid_pair
->
generated_from
->
use_candidate
=
TRUE
;
ice_check_list_queue_triggered_check
(
cr
->
cl
,
valid_pair
->
generated_from
);
MSList
*
elem
=
ms_list_find_custom
(
cr
->
cl
->
valid_list
,
(
MSCompareFunc
)
ice_find_use_candidate_valid_pair_from_componentID
,
&
valid_pair
->
valid
->
local
->
componentID
);
if
(
elem
==
NULL
)
{
valid_pair
->
generated_from
->
use_candidate
=
TRUE
;
ice_check_list_queue_triggered_check
(
cr
->
cl
,
valid_pair
->
generated_from
);
}
}
}
...
...
@@ -2437,6 +2441,11 @@ static void ice_conclude_waiting_frozen_and_inprogress_pairs(const IceValidCandi
}
}
static
int
ice_find_use_candidate_valid_pair_from_componentID
(
const
IceValidCandidatePair
*
valid_pair
,
const
uint16_t
*
componentID
)
{
return
!
((
valid_pair
->
valid
->
use_candidate
==
TRUE
)
&&
(
valid_pair
->
valid
->
local
->
componentID
==
*
componentID
));
}
static
int
ice_find_nominated_valid_pair_from_componentID
(
const
IceValidCandidatePair
*
valid_pair
,
const
uint16_t
*
componentID
)
{
return
!
((
valid_pair
->
valid
->
is_nominated
==
TRUE
)
&&
(
valid_pair
->
valid
->
local
->
componentID
==
*
componentID
));
...
...
@@ -2450,6 +2459,7 @@ static void ice_find_nominated_valid_pair_for_componentID(const uint16_t *compon
cb
->
result
=
FALSE
;
}
}
static
int
ice_find_selected_valid_pair_from_componentID
(
const
IceValidCandidatePair
*
valid_pair
,
const
uint16_t
*
componentID
)
{
return
!
((
valid_pair
->
selected
==
TRUE
)
&&
(
valid_pair
->
valid
->
local
->
componentID
==
*
componentID
));
...
...
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