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
6a9b199a
Commit
6a9b199a
authored
Mar 17, 2017
by
Ghislain MARY
Browse files
Remove a lot of deprecation warnings.
parent
480724b1
Changes
31
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
60 additions
and
62 deletions
+60
-62
console/commands.c
console/commands.c
+11
-11
console/linphonec.c
console/linphonec.c
+1
-1
coreapi/callbacks.c
coreapi/callbacks.c
+3
-4
coreapi/conference.cc
coreapi/conference.cc
+9
-9
coreapi/linphonecall.c
coreapi/linphonecall.c
+4
-4
coreapi/linphonecore.c
coreapi/linphonecore.c
+6
-6
coreapi/misc.c
coreapi/misc.c
+1
-1
daemon/commands/answer.cc
daemon/commands/answer.cc
+2
-2
daemon/commands/audio-codec-set.cc
daemon/commands/audio-codec-set.cc
+2
-2
daemon/commands/audio-stream-start.cc
daemon/commands/audio-stream-start.cc
+1
-1
daemon/commands/call-pause.cc
daemon/commands/call-pause.cc
+1
-1
daemon/commands/call-resume.cc
daemon/commands/call-resume.cc
+1
-1
daemon/commands/call-transfer.cc
daemon/commands/call-transfer.cc
+2
-3
daemon/commands/terminate.cc
daemon/commands/terminate.cc
+1
-1
daemon/commands/video.cc
daemon/commands/video.cc
+2
-2
daemon/daemon.cc
daemon/daemon.cc
+2
-2
gtk/incall_view.c
gtk/incall_view.c
+4
-4
gtk/main.c
gtk/main.c
+5
-5
gtk/propertybox.c
gtk/propertybox.c
+1
-1
gtk/videowindow.c
gtk/videowindow.c
+1
-1
No files found.
console/commands.c
View file @
6a9b199a
...
...
@@ -677,13 +677,13 @@ lpc_cmd_transfer(LinphoneCore *lc, char *args)
linphonec_out
(
"No active call, please specify a call id among the ones listed by 'calls' command.
\n
"
);
return
0
;
}
linphone_c
ore
_transfer
_call
(
lc
,
call
,
refer_to
);
linphone_c
all
_transfer
(
call
,
refer_to
);
}
else
if
(
n
==
2
){
long
id
=
atoi
(
arg1
);
refer_to
=
args
+
strlen
(
arg1
)
+
1
;
call
=
linphonec_get_call
(
id
);
if
(
call
==
NULL
)
return
0
;
linphone_c
ore
_transfer
_call
(
lc
,
call
,
refer_to
);
linphone_c
all
_transfer
(
call
,
refer_to
);
}
else
if
(
n
==
3
){
long
id
=
atoi
(
arg1
);
call
=
linphonec_get_call
(
id
);
...
...
@@ -693,7 +693,7 @@ lpc_cmd_transfer(LinphoneCore *lc, char *args)
return
0
;
}
linphonec_out
(
"Performing attended transfer of call %i to call %i"
,
id
,
id2
);
linphone_c
ore
_transfer_
call_
to_another
(
lc
,
call
,
call2
);
linphone_c
all
_transfer_to_another
(
call
,
call2
);
}
else
return
0
;
}
else
{
linphonec_out
(
"Transfer command requires at least one argument
\n
"
);
...
...
@@ -726,7 +726,7 @@ lpc_cmd_terminate(LinphoneCore *lc, char *args)
long
id
=
atoi
(
args
);
LinphoneCall
*
call
=
linphonec_get_call
(
id
);
if
(
call
){
if
(
linphone_c
ore
_terminate
_call
(
lc
,
call
)
==-
1
){
if
(
linphone_c
all
_terminate
(
call
)
==-
1
){
linphonec_out
(
"Could not stop the call with id %li
\n
"
,
id
);
}
}
else
return
0
;
...
...
@@ -749,7 +749,7 @@ lpc_cmd_redirect(LinphoneCore *lc, char *args){
while
(
elem
!=
NULL
){
LinphoneCall
*
call
=
(
LinphoneCall
*
)
elem
->
data
;
if
(
linphone_call_get_state
(
call
)
==
LinphoneCallIncomingReceived
){
if
(
linphone_c
ore
_redirect
_call
(
lc
,
call
,
args
+
4
)
!=
0
)
{
if
(
linphone_c
all
_redirect
(
call
,
args
+
4
)
!=
0
)
{
linphonec_out
(
"Could not redirect call.
\n
"
);
elem
=
elem
->
next
;
}
else
{
...
...
@@ -771,7 +771,7 @@ lpc_cmd_redirect(LinphoneCore *lc, char *args){
if
(
call
!=
NULL
)
{
if
(
linphone_call_get_state
(
call
)
!=
LinphoneCallIncomingReceived
)
{
linphonec_out
(
"The state of the call is not incoming, can't be redirected.
\n
"
);
}
else
if
(
linphone_c
ore
_redirect
_call
(
lc
,
call
,
args
+
charRead
)
!=
0
)
{
}
else
if
(
linphone_c
all
_redirect
(
call
,
args
+
charRead
)
!=
0
)
{
linphonec_out
(
"Could not redirect call.
\n
"
);
}
}
...
...
@@ -802,7 +802,7 @@ lpc_cmd_answer(LinphoneCore *lc, char *args){
long
id
;
if
(
sscanf
(
args
,
"%li"
,
&
id
)
==
1
){
LinphoneCall
*
call
=
linphonec_get_call
(
id
);
if
(
linphone_c
ore
_accept
_call
(
lc
,
call
)
==-
1
){
if
(
linphone_c
all
_accept
(
call
)
==-
1
){
linphonec_out
(
"Fail to accept call %i
\n
"
,
id
);
}
}
else
return
0
;
...
...
@@ -1454,7 +1454,7 @@ static int lpc_cmd_pause(LinphoneCore *lc, char *args){
if
(
linphone_core_in_call
(
lc
))
{
linphone_c
ore
_pause
_call
(
lc
,
linphone_core_get_current_call
(
lc
));
linphone_c
all
_pause
(
linphone_core_get_current_call
(
lc
));
return
1
;
}
linphonec_out
(
"you can only pause when a call is in process
\n
"
);
...
...
@@ -1475,7 +1475,7 @@ static int lpc_cmd_resume(LinphoneCore *lc, char *args){
if
(
n
==
1
){
LinphoneCall
*
call
=
linphonec_get_call
(
id
);
if
(
call
){
if
(
linphone_c
ore
_resume
_call
(
lc
,
call
)
==-
1
){
if
(
linphone_c
all
_resume
(
call
)
==-
1
){
linphonec_out
(
"There was a problem to resume the call check the remote address you gave %s
\n
"
,
args
);
}
}
...
...
@@ -1488,7 +1488,7 @@ static int lpc_cmd_resume(LinphoneCore *lc, char *args){
int
nbcalls
=
(
int
)
bctbx_list_size
(
calls
);
if
(
nbcalls
==
1
)
{
if
(
linphone_c
ore
_resume
_call
(
lc
,
calls
->
data
)
<
0
)
if
(
linphone_c
all
_resume
(
calls
->
data
)
<
0
)
{
linphonec_out
(
"There was a problem to resume the unique call.
\n
"
);
}
...
...
@@ -2573,7 +2573,7 @@ static int lpc_cmd_camera(LinphoneCore *lc, char *args){
/*update the call to add the video stream*/
LinphoneCallParams
*
ncp
=
linphone_call_params_copy
(
cp
);
linphone_call_params_enable_video
(
ncp
,
TRUE
);
linphone_c
ore
_update
_call
(
lc
,
call
,
ncp
);
linphone_c
all
_update
(
call
,
ncp
);
linphone_call_params_unref
(
ncp
);
linphonec_out
(
"Trying to bring up video stream...
\n
"
);
}
...
...
console/linphonec.c
View file @
6a9b199a
...
...
@@ -367,7 +367,7 @@ static void linphonec_call_state_changed(LinphoneCore *lc, LinphoneCall *call, L
linphonec_out
(
"Sending early media using real hardware
\n
"
);
linphone_call_params_enable_early_media_sending
(
callparams
,
TRUE
);
if
(
vcap_enabled
)
linphone_call_params_enable_video
(
callparams
,
TRUE
);
linphone_c
ore
_accept_early_media_with_params
(
lc
,
call
,
callparams
);
linphone_c
all
_accept_early_media_with_params
(
call
,
callparams
);
linphone_call_params_unref
(
callparams
);
}
break
;
...
...
coreapi/callbacks.c
View file @
6a9b199a
...
...
@@ -663,7 +663,7 @@ static void call_updated_by_remote(LinphoneCore *lc, LinphoneCall *call){
linphone_call_set_state
(
call
,
LinphoneCallUpdatedByRemote
,
"Call updated by remote"
);
if
(
call
->
defer_update
==
FALSE
){
if
(
call
->
state
==
LinphoneCallUpdatedByRemote
){
linphone_c
ore
_accept_
call_
update
(
lc
,
call
,
NULL
);
linphone_c
all
_accept_update
(
call
,
NULL
);
}
else
{
/*otherwise it means that the app responded by linphone_core_accept_call_update
* within the callback, so job is already done.*/
...
...
@@ -848,7 +848,7 @@ static int resume_call_after_failed_transfer(LinphoneCall *call){
if
(
call
->
was_automatically_paused
&&
call
->
state
==
LinphoneCallPaused
){
if
(
sal_op_is_idle
(
call
->
op
)){
linphone_c
ore
_resume
_call
(
call
->
core
,
call
);
linphone_c
all
_resume
(
call
);
}
else
{
ms_message
(
"resume_call_after_failed_transfer(), salop was busy"
);
return
BELLE_SIP_CONTINUE
;
...
...
@@ -1286,7 +1286,6 @@ static bool_t auth_requested(Sal* sal, SalAuthInfo* sai) {
}
static
void
notify_refer
(
SalOp
*
op
,
SalReferStatus
status
){
LinphoneCore
*
lc
=
(
LinphoneCore
*
)
sal_get_user_pointer
(
sal_op_get_sal
(
op
));
LinphoneCall
*
call
=
(
LinphoneCall
*
)
sal_op_get_user_pointer
(
op
);
LinphoneCallState
cstate
;
if
(
call
==
NULL
)
{
...
...
@@ -1309,7 +1308,7 @@ static void notify_refer(SalOp *op, SalReferStatus status){
linphone_call_set_transfer_state
(
call
,
cstate
);
if
(
cstate
==
LinphoneCallConnected
){
/*automatically terminate the call as the transfer is complete.*/
linphone_c
ore
_terminate
_call
(
lc
,
call
);
linphone_c
all
_terminate
(
call
);
}
}
...
...
coreapi/conference.cc
View file @
6a9b199a
...
...
@@ -389,7 +389,7 @@ int LocalConference::addParticipant(LinphoneCall *call) {
if
(
call
->
state
==
LinphoneCallPaused
){
call
->
params
->
in_conference
=
TRUE
;
call
->
params
->
has_video
=
FALSE
;
linphone_c
ore
_resume
_call
(
m_core
,
call
);
linphone_c
all
_resume
(
call
);
}
else
if
(
call
->
state
==
LinphoneCallStreamsRunning
){
LinphoneCallParams
*
params
=
linphone_call_params_copy
(
linphone_call_get_current_params
(
call
));
params
->
in_conference
=
TRUE
;
...
...
@@ -404,7 +404,7 @@ int LocalConference::addParticipant(LinphoneCall *call) {
}
/*this will trigger a reINVITE that will later redraw the streams */
/*FIXME probably a bit too much to just redraw streams !*/
linphone_c
ore
_update
_call
(
m_core
,
call
,
params
);
linphone_c
all
_update
(
call
,
params
);
linphone_call_params_unref
(
params
);
addLocalEndpoint
();
}
else
{
...
...
@@ -441,7 +441,7 @@ int LocalConference::removeFromConference(LinphoneCall *call, bool_t active){
leave
();
}
ms_message
(
"Updating call to actually remove from conference"
);
err
=
linphone_c
ore
_update
_call
(
m_core
,
call
,
params
);
err
=
linphone_c
all
_update
(
call
,
params
);
linphone_call_params_unref
(
params
);
}
else
{
ms_message
(
"Pausing call to actually remove from conference"
);
...
...
@@ -514,7 +514,7 @@ int LocalConference::terminate() {
LinphoneCall
*
call
=
(
LinphoneCall
*
)
calls
->
data
;
calls
=
calls
->
next
;
if
(
call
->
current_params
->
in_conference
)
{
linphone_c
ore
_terminate
_call
(
m_core
,
call
);
linphone_c
all
_terminate
(
call
);
}
}
...
...
@@ -725,7 +725,7 @@ int RemoteConference::terminate() {
switch
(
m_state
)
{
case
LinphoneConferenceRunning
:
case
LinphoneConferenceStarting
:
linphone_c
ore
_terminate
_call
(
m_core
,
m_focusCall
);
linphone_c
all
_terminate
(
m_focusCall
);
break
;
default:
break
;
...
...
@@ -742,7 +742,7 @@ int RemoteConference::enter() {
switch
(
callState
)
{
case
LinphoneCallStreamsRunning
:
break
;
case
LinphoneCallPaused
:
linphone_c
ore
_resume
_call
(
m_core
,
m_focusCall
);
linphone_c
all
_resume
(
m_focusCall
);
break
;
default:
ms_error
(
"Could not join the conference: bad focus call state (%s)"
,
linphone_call_state_to_string
(
callState
));
...
...
@@ -760,7 +760,7 @@ int RemoteConference::leave() {
switch
(
callState
)
{
case
LinphoneCallPaused
:
break
;
case
LinphoneCallStreamsRunning
:
linphone_c
ore
_pause
_call
(
m_core
,
m_focusCall
);
linphone_c
all
_pause
(
m_focusCall
);
break
;
default:
ms_error
(
"Could not leave the conference: bad focus call state (%s)"
,
linphone_call_state_to_string
(
callState
));
...
...
@@ -783,7 +783,7 @@ bool RemoteConference::focusIsReady() const {
}
bool
RemoteConference
::
transferToFocus
(
LinphoneCall
*
call
)
{
if
(
linphone_c
ore
_transfer
_call
(
m_core
,
call
,
m_focusContact
)
==
0
)
{
if
(
linphone_c
all
_transfer
(
call
,
m_focusContact
)
==
0
)
{
m_transferingCalls
.
push_back
(
call
);
return
true
;
}
else
{
...
...
@@ -847,7 +847,7 @@ void RemoteConference::onPendingCallStateChanged(LinphoneCall *call, LinphoneCal
if
(
m_state
==
LinphoneConferenceRunning
)
{
m_pendingCalls
.
remove
(
call
);
m_transferingCalls
.
push_back
(
call
);
linphone_c
ore
_transfer
_call
(
m_core
,
call
,
m_focusContact
);
linphone_c
all
_transfer
(
call
,
m_focusContact
);
}
break
;
...
...
coreapi/linphonecall.c
View file @
6a9b199a
...
...
@@ -4326,7 +4326,7 @@ static void linphone_call_lost(LinphoneCall *call){
ms_message
(
"LinphoneCall [%p]: %s"
,
call
,
temp
);
linphone_core_notify_display_warning
(
lc
,
temp
);
sal_error_info_set
(
&
call
->
non_op_error
,
SalReasonIOError
,
503
,
"IO error"
,
NULL
);
linphone_c
ore
_terminate
_call
(
lc
,
call
);
linphone_c
all
_terminate
(
call
);
linphone_core_play_named_tone
(
lc
,
LinphoneToneCallLost
);
ms_free
(
temp
);
}
...
...
@@ -4360,7 +4360,7 @@ static void handle_ice_events(LinphoneCall *call, OrtpEvent *ev){
if
(
ice_session_role
(
call
->
ice_session
)
==
IR_Controlling
&&
current_param
->
update_call_when_ice_completed
)
{
LinphoneCallParams
*
params
=
linphone_core_create_call_params
(
call
->
core
,
call
);
params
->
internal_call_update
=
TRUE
;
linphone_c
ore
_update
_call
(
call
->
core
,
call
,
params
);
linphone_c
all
_update
(
call
,
params
);
linphone_call_params_unref
(
params
);
}
start_dtls_on_all_streams
(
call
);
...
...
@@ -4402,7 +4402,7 @@ static void handle_ice_events(LinphoneCall *call, OrtpEvent *ev){
}
}
else
if
(
evt
==
ORTP_EVENT_ICE_RESTART_NEEDED
)
{
ice_session_restart
(
call
->
ice_session
,
IR_Controlling
);
linphone_c
ore
_update
_call
(
call
->
core
,
call
,
call
->
current_params
);
linphone_c
all
_update
(
call
,
call
->
current_params
);
}
}
...
...
@@ -5695,7 +5695,7 @@ void linphone_call_reinvite_to_recover_from_connection_loss(LinphoneCall *call)
ice_session_reset
(
call
->
ice_session
,
IR_Controlling
);
}
params
=
linphone_core_create_call_params
(
call
->
core
,
call
);
linphone_c
ore
_update
_call
(
call
->
core
,
call
,
params
);
linphone_c
all
_update
(
call
,
params
);
linphone_call_params_unref
(
params
);
}
...
...
coreapi/linphonecore.c
View file @
6a9b199a
...
...
@@ -2980,7 +2980,7 @@ void linphone_core_iterate(LinphoneCore *lc){
decline_reason
=
(
lc
->
current_call
!=
call
)
?
LinphoneReasonBusy
:
LinphoneReasonDeclined
;
call
->
log
->
status
=
LinphoneCallMissed
;
sal_error_info_set
(
&
call
->
non_op_error
,
SalReasonRequestTimeout
,
408
,
"Not answered"
,
NULL
);
linphone_c
ore
_decline
_call
(
lc
,
call
,
decline_reason
);
linphone_c
all
_decline
(
call
,
decline_reason
);
}
}
if
(
(
lc
->
sip_conf
.
in_call_timeout
>
0
)
...
...
@@ -2988,7 +2988,7 @@ void linphone_core_iterate(LinphoneCore *lc){
&&
((
current_real_time
-
call
->
log
->
connected_date_time
)
>
lc
->
sip_conf
.
in_call_timeout
))
{
ms_message
(
"in call timeout (%i)"
,
lc
->
sip_conf
.
in_call_timeout
);
linphone_c
ore
_terminate
_call
(
lc
,
call
);
linphone_c
all
_terminate
(
call
);
}
}
...
...
@@ -3429,11 +3429,11 @@ void linphone_core_notify_incoming_call(LinphoneCore *lc, LinphoneCall *call){
linphone_call_set_contact_op
(
call
);
if
(
propose_early_media
){
linphone_c
ore
_accept_early_media
(
lc
,
call
);
linphone_c
all
_accept_early_media
(
call
);
}
else
sal_call_notify_ringing
(
call
->
op
,
FALSE
);
if
(
sal_call_get_replaces
(
call
->
op
)
!=
NULL
&&
lp_config_get_int
(
lc
->
config
,
"sip"
,
"auto_answer_replacing_calls"
,
1
)){
linphone_c
ore
_accept
_call
(
lc
,
call
);
linphone_c
all
_accept
(
call
);
}
}
linphone_call_unref
(
call
);
...
...
@@ -3505,7 +3505,7 @@ int linphone_core_terminate_all_calls(LinphoneCore *lc){
while
(
calls
)
{
LinphoneCall
*
c
=
(
LinphoneCall
*
)
calls
->
data
;
calls
=
calls
->
next
;
linphone_c
ore
_terminate
_call
(
lc
,
c
);
linphone_c
all
_terminate
(
c
);
}
return
0
;
}
...
...
@@ -5631,7 +5631,7 @@ static void linphone_core_uninit(LinphoneCore *lc)
while
(
lc
->
calls
)
{
LinphoneCall
*
the_call
=
lc
->
calls
->
data
;
linphone_c
ore
_terminate
_call
(
lc
,
the_call
);
linphone_c
all
_terminate
(
the_call
);
linphone_core_iterate
(
lc
);
ms_usleep
(
10000
);
}
...
...
coreapi/misc.c
View file @
6a9b199a
...
...
@@ -184,7 +184,7 @@ static int lookup_vbr_typical_bitrate(int maxbw, int clock_rate){
}
static
int
get_audio_payload_bandwidth
(
LinphoneCore
*
lc
,
const
PayloadType
*
pt
,
int
maxbw
){
if
(
linphone_
core_
payload_type_is_vbr
(
lc
,
pt
)){
if
(
linphone_payload_type_is_vbr
(
pt
)){
if
(
pt
->
flags
&
PAYLOAD_TYPE_BITRATE_OVERRIDE
){
ms_debug
(
"PayloadType %s/%i has bitrate override"
,
pt
->
mime_type
,
pt
->
clock_rate
);
return
pt
->
normal_bitrate
/
1000
;
...
...
daemon/commands/answer.cc
View file @
6a9b199a
...
...
@@ -49,7 +49,7 @@ void AnswerCommand::exec(Daemon *app, const string& args) {
call
=
(
LinphoneCall
*
)
elem
->
data
;
LinphoneCallState
cstate
=
linphone_call_get_state
(
call
);
if
(
cstate
==
LinphoneCallIncomingReceived
||
cstate
==
LinphoneCallIncomingEarlyMedia
)
{
if
(
linphone_c
ore
_accept
_call
(
lc
,
call
)
==
0
)
{
if
(
linphone_c
all
_accept
(
call
)
==
0
)
{
app
->
sendResponse
(
Response
());
return
;
}
...
...
@@ -64,7 +64,7 @@ void AnswerCommand::exec(Daemon *app, const string& args) {
LinphoneCallState
cstate
=
linphone_call_get_state
(
call
);
if
(
cstate
==
LinphoneCallIncomingReceived
||
cstate
==
LinphoneCallIncomingEarlyMedia
)
{
if
(
linphone_c
ore
_accept
_call
(
lc
,
call
)
==
0
)
{
if
(
linphone_c
all
_accept
(
call
)
==
0
)
{
app
->
sendResponse
(
Response
());
return
;
}
...
...
daemon/commands/audio-codec-set.cc
View file @
6a9b199a
...
...
@@ -71,7 +71,7 @@ static PayloadType *findPayload(LinphoneCore *lc, int payload_type, int *index){
for
(
const
bctbx_list_t
*
node
=
linphone_core_get_audio_codecs
(
lc
);
node
!=
NULL
;
node
=
bctbx_list_next
(
node
))
{
PayloadType
*
payload
=
reinterpret_cast
<
PayloadType
*>
(
node
->
data
);
if
(
index
)
(
*
index
)
++
;
if
(
payload_type
==
linphone_
core_get_
payload_type_number
(
lc
,
payload
))
{
if
(
payload_type
==
linphone_payload_type_
get_
number
(
payload
))
{
return
payload
;
}
}
...
...
@@ -127,7 +127,7 @@ void AudioCodecSetCommand::exec(Daemon *app, const string& args) {
if
(
conflict
)
{
app
->
sendResponse
(
Response
(
"New payload type number is already used."
,
Response
::
Error
));
}
else
{
linphone_
core_set_
payload_type_number
(
app
->
getCore
(),
payload
,
idx
);
linphone_payload_type_
set_
number
(
payload
,
idx
);
app
->
sendResponse
(
PayloadTypeResponse
(
app
->
getCore
(),
payload
,
parser
.
getPosition
()));
}
return
;
...
...
daemon/commands/audio-stream-start.cc
View file @
6a9b199a
...
...
@@ -33,7 +33,7 @@ static PayloadType *getPayloadType(LinphoneCore *lc, const MSList *codecs, int n
const
MSList
*
elem
;
for
(
elem
=
codecs
;
elem
!=
NULL
;
elem
=
elem
->
next
)
{
PayloadType
*
pt
=
(
PayloadType
*
)
elem
->
data
;
if
(
linphone_
core_get_
payload_type_number
(
lc
,
pt
)
==
number
)
if
(
linphone_payload_type_
get_
number
(
pt
)
==
number
)
return
pt
;
}
return
NULL
;
...
...
daemon/commands/call-pause.cc
View file @
6a9b199a
...
...
@@ -62,7 +62,7 @@ void CallPauseCommand::exec(Daemon* app, const string& args)
}
}
if
(
linphone_c
ore
_pause
_call
(
lc
,
call
)
==
0
)
{
if
(
linphone_c
all
_pause
(
call
)
==
0
)
{
app
->
sendResponse
(
Response
(
current
?
"Current call was paused"
:
"Call was paused"
,
Response
::
Ok
));
}
else
{
app
->
sendResponse
(
Response
(
"Error pausing call"
));
...
...
daemon/commands/call-resume.cc
View file @
6a9b199a
...
...
@@ -60,7 +60,7 @@ void CallResumeCommand::exec(Daemon* app, const string& args)
}
}
if
(
linphone_c
ore
_resume
_call
(
lc
,
call
)
==
0
)
{
if
(
linphone_c
all
_resume
(
call
)
==
0
)
{
app
->
sendResponse
(
Response
(
current
?
"Current call was resumed"
:
"Call was resumed"
,
Response
::
Ok
));
}
else
{
app
->
sendResponse
(
Response
(
"Error pausing call"
));
...
...
daemon/commands/call-transfer.cc
View file @
6a9b199a
...
...
@@ -43,7 +43,6 @@ CallTransferCommand::CallTransferCommand() :
void
CallTransferCommand
::
exec
(
Daemon
*
app
,
const
string
&
args
)
{
LinphoneCore
*
lc
=
app
->
getCore
();
LinphoneCall
*
call_to_transfer
=
NULL
;
LinphoneCall
*
call_to_transfer_to
=
NULL
;
istringstream
ist
(
args
);
...
...
@@ -85,7 +84,7 @@ void CallTransferCommand::exec(Daemon* app, const string& args)
app
->
sendResponse
(
Response
(
"No call with such id."
));
return
;
}
if
(
linphone_c
ore
_transfer_
call_
to_another
(
lc
,
call_to_transfer
,
call_to_transfer_to
)
==
0
)
{
if
(
linphone_c
all
_transfer_to_another
(
call_to_transfer
,
call_to_transfer_to
)
==
0
)
{
std
::
ostringstream
ostr
;
ostr
<<
"Call ID: "
<<
call_to_transfer_id
<<
"
\n
"
;
ostr
<<
"Transfer to: "
<<
call_to_transfer_to_id
<<
"
\n
"
;
...
...
@@ -93,7 +92,7 @@ void CallTransferCommand::exec(Daemon* app, const string& args)
return
;
}
}
else
{
if
(
linphone_c
ore
_transfer
_call
(
lc
,
call_to_transfer
,
sip_uri_to_transfer_to
.
c_str
())
==
0
)
{
if
(
linphone_c
all
_transfer
(
call_to_transfer
,
sip_uri_to_transfer_to
.
c_str
())
==
0
)
{
std
::
ostringstream
ostr
;
ostr
<<
"Call ID: "
<<
call_to_transfer_id
<<
"
\n
"
;
ostr
<<
"Transfer to: "
<<
sip_uri_to_transfer_to
<<
"
\n
"
;
...
...
daemon/commands/terminate.cc
View file @
6a9b199a
...
...
@@ -56,6 +56,6 @@ void TerminateCommand::exec(Daemon *app, const string& args) {
app
->
sendResponse
(
Response
(
"No active call."
));
return
;
}
linphone_c
ore
_terminate
_call
(
app
->
getCore
(),
call
);
linphone_c
all
_terminate
(
call
);
app
->
sendResponse
(
Response
());
}
daemon/commands/video.cc
View file @
6a9b199a
...
...
@@ -71,8 +71,8 @@ void Video::exec(Daemon* app, const string& args)
activate
=
!
linphone_call_params_video_enabled
(
new_params
);
linphone_call_params_enable_video
(
new_params
,
activate
);
linphone_c
ore
_update
_call
(
lc
,
call
,
new_params
);
linphone_call_params_
destroy
(
new_params
);
linphone_c
all
_update
(
call
,
new_params
);
linphone_call_params_
unref
(
new_params
);
}
else
{
app
->
sendResponse
(
Response
(
"No streams running: can't [de]activate video"
));
...
...
daemon/daemon.cc
View file @
6a9b199a
...
...
@@ -251,7 +251,7 @@ PayloadTypeResponse::PayloadTypeResponse(LinphoneCore *core, const PayloadType *
if
(
payloadType
!=
NULL
)
{
if
(
index
>=
0
)
ostr
<<
prefix
<<
"Index: "
<<
index
<<
"
\n
"
;
ostr
<<
prefix
<<
"Payload-type-number: "
<<
linphone_
core_get_
payload_type_number
(
core
,
payloadType
)
<<
"
\n
"
;
ostr
<<
prefix
<<
"Payload-type-number: "
<<
linphone_payload_type_
get_
number
(
payloadType
)
<<
"
\n
"
;
ostr
<<
prefix
<<
"Clock-rate: "
<<
payloadType
->
clock_rate
<<
"
\n
"
;
ostr
<<
prefix
<<
"Bitrate: "
<<
payloadType
->
normal_bitrate
<<
"
\n
"
;
ostr
<<
prefix
<<
"Mime: "
<<
payloadType
->
mime_type
<<
"
\n
"
;
...
...
@@ -284,7 +284,7 @@ PayloadTypeParser::PayloadTypeParser(LinphoneCore *core, const string &mime_type
}
else
if
(
number
!=-
1
){
const
bctbx_list_t
*
elem
;
for
(
elem
=
linphone_core_get_audio_codecs
(
core
);
elem
!=
NULL
;
elem
=
elem
->
next
){
if
(
number
==
linphone_
core_get_
payload_type_number
(
core
,
(
PayloadType
*
)
elem
->
data
)){
if
(
number
==
linphone_payload_type_
get_
number
((
PayloadType
*
)
elem
->
data
)){
mPayloadType
=
(
PayloadType
*
)
elem
->
data
;
break
;
}
...
...
gtk/incall_view.c
View file @
6a9b199a
...
...
@@ -126,7 +126,7 @@ static void linphone_gtk_in_call_set_animation_spinner(GtkWidget *callview){
static
void
linphone_gtk_transfer_call
(
LinphoneCall
*
dest_call
){
LinphoneCall
*
call
=
linphone_gtk_get_currently_displayed_call
(
NULL
);
if
(
call
)
linphone_c
ore
_transfer_
call_
to_another
(
linphone_gtk_get_core
(),
call
,
dest_call
);
if
(
call
)
linphone_c
all
_transfer_to_another
(
call
,
dest_call
);
}
void
transfer_button_clicked
(
GtkWidget
*
button
,
gpointer
call_ref
){
...
...
@@ -464,7 +464,7 @@ static void video_button_clicked(GtkWidget *button, LinphoneCall *call){
LinphoneCallParams
*
params
=
linphone_core_create_call_params
(
lc
,
call
);
gtk_widget_set_sensitive
(
button
,
FALSE
);
linphone_call_params_enable_video
(
params
,
adding
);
linphone_c
ore
_update
_call
(
lc
,
call
,
params
);
linphone_c
all
_update
(
call
,
params
);
linphone_call_params_unref
(
params
);
}
...
...
@@ -949,11 +949,11 @@ void linphone_gtk_hold_clicked(GtkButton *button){
if
(
!
call
)
return
;
if
(
!
active
)
{
linphone_c
ore
_pause
_call
(
linphone_gtk_get_core
(),
call
);
linphone_c
all
_pause
(
call
);
}
else
{
linphone_c
ore
_resume
_call
(
linphone_gtk_get_core
(),
call
);
linphone_c
all
_resume
(
call
);
}
}
...
...
gtk/main.c
View file @
6a9b199a
...
...
@@ -942,7 +942,7 @@ static void accept_incoming_call(LinphoneCall *call){
LinphoneCallParams
*
params
=
linphone_core_create_call_params
(
lc
,
call
);
gchar
*
record_file
=
linphone_gtk_get_record_path
(
linphone_call_get_remote_address
(
call
),
FALSE
);
linphone_call_params_set_record_file
(
params
,
record_file
);
linphone_c
ore
_accept_
call_
with_params
(
lc
,
call
,
params
);
linphone_c
all
_accept_with_params
(
call
,
params
);
linphone_call_params_unref
(
params
);
}
...
...
@@ -992,7 +992,7 @@ void linphone_gtk_terminate_call(GtkWidget *button){
gboolean
is_conf
;
LinphoneCall
*
call
=
linphone_gtk_get_currently_displayed_call
(
&
is_conf
);
if
(
call
){
linphone_c
ore
_terminate
_call
(
linphone_gtk_get_core
(),
call
);
linphone_c
all
_terminate
(
call
);
}
else
if
(
is_conf
){
linphone_core_terminate_conference
(
linphone_gtk_get_core
());
}
...
...
@@ -1001,7 +1001,7 @@ void linphone_gtk_terminate_call(GtkWidget *button){
void
linphone_gtk_decline_clicked
(
GtkWidget
*
button
){
LinphoneCall
*
call
=
linphone_gtk_get_currently_displayed_call
(
NULL
);
if
(
call
)
linphone_c
ore
_terminate
_call
(
linphone_gtk_get_core
(),
call
);
linphone_c
all
_terminate
(
call
);
}
void
linphone_gtk_answer_clicked
(
GtkWidget
*
button
){
...
...
@@ -1333,7 +1333,7 @@ static void on_call_updated_response(GtkWidget *dialog, gint responseid, gpointe
LinphoneCore
*
lc
=
linphone_call_get_core
(
call
);
LinphoneCallParams
*
params
=
linphone_core_create_call_params
(
lc
,
call
);
linphone_call_params_enable_video
(
params
,
responseid
==
GTK_RESPONSE_YES
);
linphone_c
ore
_accept_
call_
update
(
lc
,
call
,
params
);
linphone_c
all
_accept_update
(
call
,
params
);
linphone_call_params_unref
(
params
);
}
g_source_remove_by_user_data
(
dialog
);
...
...
@@ -1354,7 +1354,7 @@ static void linphone_gtk_call_updated_by_remote(LinphoneCall *call){
g_message
(
"Video used=%i, video requested=%i, automatically_accept=%i"
,
video_used
,
video_requested
,
pol
->
automatically_accept
);
if
(
!
video_used
&&
video_requested
&&
!
pol
->
automatically_accept
){
linphone_c
ore
_defer_
call_
update
(
lc
,
call
);
linphone_c
all
_defer_update
(
call
);
{
const
LinphoneAddress
*
addr
=
linphone_call_get_remote_address
(
call
);
GtkWidget
*
dialog
;
...
...
gtk/propertybox.c
View file @
6a9b199a
...
...
@@ -471,7 +471,7 @@ void linphone_gtk_cam_changed(GtkWidget *w){
if
(
strcmp
(
sel
,
linphone_core_get_video_device
(
lc
))
!=
0
){
linphone_core_set_video_device
(
lc
,
sel
);
if
((
call
=
linphone_core_get_current_call
(
lc
))
!=
NULL
)
{
linphone_c
ore
_update
_call
(
lc
,
call
,
NULL
);
linphone_c
all
_update
(
call
,
NULL
);
}
}
}
...
...
gtk/videowindow.c
View file @
6a9b199a
...
...
@@ -183,7 +183,7 @@ static void on_controls_response(GtkWidget *dialog, int response_id, GtkWidget *
case
GTK_RESPONSE_REJECT
:
{
LinphoneCall
*
call
=
(
LinphoneCall
*
)
g_object_get_data
(
G_OBJECT
(
video_window
),
"call"
);
linphone_c
ore
_terminate
_call
(
linphone_gtk_get_core
(),
call
);
linphone_c
all
_terminate
(
call
);
}
break
;
case
GTK_RESPONSE_APPLY
:
...
...
Prev
1
2
Next
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