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
1a7f7e73
Commit
1a7f7e73
authored
Oct 01, 2012
by
Ghislain MARY
Browse files
Improve ICE use candidate handling.
parent
501ae333
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
src/ice.c
src/ice.c
+9
-4
No files found.
src/ice.c
View file @
1a7f7e73
...
...
@@ -1608,7 +1608,9 @@ static IceCandidatePair * ice_construct_valid_pair(IceCheckList *cl, RtpSession
}
}
}
else
{
ms_message
(
"ice: Pair %p already in the valid list"
,
pair
);
ms_message
(
"ice: Pair already in the valid list: %s:%u:%s --> %s:%u:%s"
,
pair
->
local
->
taddr
.
ip
,
pair
->
local
->
taddr
.
port
,
candidate_type_values
[
pair
->
local
->
type
],
pair
->
remote
->
taddr
.
ip
,
pair
->
remote
->
taddr
.
port
,
candidate_type_values
[
pair
->
remote
->
type
]);
ms_free
(
valid_pair
);
}
return
pair
;
...
...
@@ -2426,8 +2428,8 @@ 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
)
{
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
(
valid_pair
->
generated_from
->
use_candidate
==
FALSE
)
{
MSList
*
elem
=
ms_list_find_custom
(
cr
->
cl
->
valid_list
,
(
MSCompareFunc
)
ice_find_use_candidate_valid_pair_from_componentID
,
&
valid_pair
->
generated_from
->
local
->
componentID
);
if
(
elem
==
NULL
)
{
valid_pair
->
generated_from
->
use_candidate
=
TRUE
;
ice_check_list_queue_triggered_check
(
cr
->
cl
,
valid_pair
->
generated_from
);
...
...
@@ -2471,7 +2473,7 @@ 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
));
return
!
((
valid_pair
->
generated_from
->
use_candidate
==
TRUE
)
&&
(
valid_pair
->
generated_from
->
local
->
componentID
==
*
componentID
));
}
static
int
ice_find_nominated_valid_pair_from_componentID
(
const
IceValidCandidatePair
*
valid_pair
,
const
uint16_t
*
componentID
)
...
...
@@ -3095,6 +3097,9 @@ static void ice_dump_valid_pair(const IceValidCandidatePair *valid_pair, int *i)
{
int
j
=
*
i
;
ice_dump_candidate_pair
(
valid_pair
->
valid
,
&
j
);
if
(
valid_pair
->
selected
)
{
ms_message
(
"
\t
--> selected"
);
}
*
i
=
j
;
}
...
...
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