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
liblinphone
Commits
37e69be0
Commit
37e69be0
authored
Oct 01, 2012
by
Ghislain MARY
Browse files
Check that ICE gathering has already been completed before launching it again.
parent
1469857a
Changes
1
Hide whitespace changes
Inline
Side-by-side
coreapi/misc.c
View file @
37e69be0
...
...
@@ -624,10 +624,13 @@ int linphone_core_gather_ice_candidates(LinphoneCore *lc, LinphoneCall *call)
ms_error
(
"Fail to get local ip"
);
return
-
1
;
}
ice_add_local_candidate
(
audio_check_list
,
"host"
,
local_addr
,
call
->
audio_port
,
1
,
NULL
);
ice_add_local_candidate
(
audio_check_list
,
"host"
,
local_addr
,
call
->
audio_port
+
1
,
2
,
NULL
);
call
->
stats
[
LINPHONE_CALL_STATS_AUDIO
].
ice_state
=
LinphoneIceStateInProgress
;
if
(
call
->
params
.
has_video
&&
(
video_check_list
!=
NULL
))
{
if
((
ice_check_list_state
(
audio_check_list
)
!=
ICL_Completed
)
&&
(
ice_check_list_candidates_gathered
(
audio_check_list
)
==
FALSE
))
{
ice_add_local_candidate
(
audio_check_list
,
"host"
,
local_addr
,
call
->
audio_port
,
1
,
NULL
);
ice_add_local_candidate
(
audio_check_list
,
"host"
,
local_addr
,
call
->
audio_port
+
1
,
2
,
NULL
);
call
->
stats
[
LINPHONE_CALL_STATS_AUDIO
].
ice_state
=
LinphoneIceStateInProgress
;
}
if
(
call
->
params
.
has_video
&&
(
video_check_list
!=
NULL
)
&&
(
ice_check_list_state
(
video_check_list
)
!=
ICL_Completed
)
&&
(
ice_check_list_candidates_gathered
(
video_check_list
)
==
FALSE
))
{
ice_add_local_candidate
(
video_check_list
,
"host"
,
local_addr
,
call
->
video_port
,
1
,
NULL
);
ice_add_local_candidate
(
video_check_list
,
"host"
,
local_addr
,
call
->
video_port
+
1
,
2
,
NULL
);
call
->
stats
[
LINPHONE_CALL_STATS_VIDEO
].
ice_state
=
LinphoneIceStateInProgress
;
...
...
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