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
ca42ee87
Commit
ca42ee87
authored
May 06, 2013
by
Simon Morlat
Browse files
important conference bugfixes
parent
4da039cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
10 deletions
+16
-10
coreapi/conference.c
coreapi/conference.c
+16
-10
No files found.
coreapi/conference.c
View file @
ca42ee87
...
...
@@ -182,7 +182,6 @@ float linphone_core_get_conference_local_input_volume(LinphoneCore *lc){
* @returns 0 if successful, -1 otherwise.
**/
int
linphone_core_add_to_conference
(
LinphoneCore
*
lc
,
LinphoneCall
*
call
){
LinphoneCallParams
params
;
LinphoneConference
*
conf
=&
lc
->
conf_ctx
;
if
(
call
->
current_params
.
in_conference
){
...
...
@@ -190,21 +189,25 @@ int linphone_core_add_to_conference(LinphoneCore *lc, LinphoneCall *call){
return
-
1
;
}
conference_check_init
(
&
lc
->
conf_ctx
,
lp_config_get_int
(
lc
->
config
,
"sound"
,
"conference_rate"
,
16000
));
call
->
params
.
in_conference
=
TRUE
;
call
->
params
.
has_video
=
FALSE
;
call
->
params
.
media_encryption
=
LinphoneMediaEncryptionNone
;
params
=
call
->
params
;
if
(
call
->
state
==
LinphoneCallPaused
)
if
(
call
->
state
==
LinphoneCallPaused
){
call
->
params
.
in_conference
=
TRUE
;
call
->
params
.
has_video
=
FALSE
;
linphone_core_resume_call
(
lc
,
call
);
else
if
(
call
->
state
==
LinphoneCallStreamsRunning
){
/*this will trigger a reINVITE that will later redraw the streams */
}
else
if
(
call
->
state
==
LinphoneCallStreamsRunning
){
LinphoneCallParams
*
params
=
linphone_call_params_copy
(
linphone_call_get_current_params
(
call
));
params
->
in_conference
=
TRUE
;
params
->
has_video
=
FALSE
;
if
(
call
->
audiostream
||
call
->
videostream
){
linphone_call_stop_media_streams
(
call
);
/*free the audio & video local resources*/
}
if
(
call
==
lc
->
current_call
){
lc
->
current_call
=
NULL
;
}
linphone_core_update_call
(
lc
,
call
,
&
params
);
/*this will trigger a reINVITE that will later redraw the streams */
linphone_core_update_call
(
lc
,
call
,
params
);
linphone_call_params_destroy
(
params
);
add_local_endpoint
(
conf
,
lc
);
}
else
{
ms_error
(
"Call is in state %s, it cannot be added to the conference."
,
linphone_call_state_to_string
(
call
->
state
));
...
...
@@ -231,13 +234,16 @@ static int remove_from_conference(LinphoneCore *lc, LinphoneCall *call, bool_t a
ms_message
(
"%s will be removed from conference"
,
str
);
ms_free
(
str
);
if
(
active
){
LinphoneCallParams
*
params
=
linphone_call_params_copy
(
linphone_call_get_current_params
(
call
));
params
->
in_conference
=
FALSE
;
// reconnect local audio with this call
if
(
linphone_core_is_in_conference
(
lc
)){
ms_message
(
"Leaving conference for reconnecting with unique call."
);
linphone_core_leave_conference
(
lc
);
}
ms_message
(
"Updating call to actually remove from conference"
);
err
=
linphone_core_update_call
(
lc
,
call
,
&
call
->
params
);
err
=
linphone_core_update_call
(
lc
,
call
,
params
);
linphone_call_params_destroy
(
params
);
}
else
{
ms_message
(
"Pausing call to actually remove from conference"
);
err
=
_linphone_core_pause_call
(
lc
,
call
);
...
...
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