Commit e6ef9df3 authored by Ronan's avatar Ronan

fix(linphone): supports gcc 8

parent 77799c74
......@@ -516,8 +516,10 @@ static void call_ringing(SalOp *h){
}
}
static void start_pending_refer(LinphoneCall *call){
linphone_core_start_refered_call(call->core, call,NULL);
static unsigned char start_pending_refer (void *call) {
LinphoneCall *to_refer = static_cast<LinphoneCall *>(call);
linphone_core_start_refered_call(to_refer->core, to_refer, NULL);
return 0;
}
static void process_call_accepted(LinphoneCore *lc, LinphoneCall *call, SalOp *op){
......@@ -605,7 +607,7 @@ static void process_call_accepted(LinphoneCore *lc, LinphoneCall *call, SalOp *o
next_state = LinphoneCallPaused;
next_state_str = "Call paused";
if (call->refer_pending)
linphone_task_list_add(&tl, (LinphoneCoreIterateHook)start_pending_refer, call);
linphone_task_list_add(&tl, start_pending_refer, call);
break;
default:
ms_error("call_accepted(): don't know what to do in state [%s]", linphone_call_state_to_string(call->state));
......@@ -905,19 +907,20 @@ static void call_terminated(SalOp *op, const char *from){
linphone_call_set_state(call, LinphoneCallEnd,"Call ended");
}
static int resume_call_after_failed_transfer(LinphoneCall *call){
if (call->was_automatically_paused && call->state==LinphoneCallPausing)
static int resume_call_after_failed_transfer (void *call, unsigned int) {
LinphoneCall *to_resume = static_cast<LinphoneCall *>(call);
if (to_resume->was_automatically_paused && to_resume->state==LinphoneCallPausing)
return BELLE_SIP_CONTINUE; /*was still in pausing state*/
if (call->was_automatically_paused && call->state==LinphoneCallPaused){
if (sal_op_is_idle(call->op)){
linphone_call_resume(call);
if (to_resume->was_automatically_paused && to_resume->state==LinphoneCallPaused){
if (sal_op_is_idle(to_resume->op)){
linphone_call_resume(to_resume);
}else {
ms_message("resume_call_after_failed_transfer(), salop was busy");
return BELLE_SIP_CONTINUE;
}
}
linphone_call_unref(call);
linphone_call_unref(to_resume);
return BELLE_SIP_STOP;
}
......@@ -1080,7 +1083,7 @@ static void call_failure(SalOp *op){
/*notify referer of the failure*/
linphone_core_notify_refer_state(lc,referer,call);
/*schedule automatic resume of the call. This must be done only after the notifications are completed due to dialog serialization of requests.*/
linphone_core_queue_task(lc,(belle_sip_source_func_t)resume_call_after_failed_transfer,linphone_call_ref(referer),"Automatic call resuming after failed transfer");
linphone_core_queue_task(lc, resume_call_after_failed_transfer,linphone_call_ref(referer),"Automatic call resuming after failed transfer");
}
}
......
......@@ -520,8 +520,12 @@ void linphone_friend_invalidate_subscription(LinphoneFriend *lf){
lf->initial_subscribes_sent=FALSE;
}
static void sal_notify_presence_close_cb (void *op) {
sal_notify_presence_close(static_cast<SalOp *>(op));
}
static void linphone_friend_close_incoming_subscriptions(LinphoneFriend *lf) {
bctbx_list_for_each(lf->insubs, (MSIterateFunc) sal_notify_presence_close);
bctbx_list_for_each(lf->insubs, sal_notify_presence_close_cb);
lf->insubs = bctbx_list_free_with_data(lf->insubs, (MSIterateFunc)sal_op_release);
}
......
......@@ -93,10 +93,10 @@ void RegisterInfoCommand::exec(Daemon *app, const std::string& args) {
int id;
try {
id = atoi(param.c_str());
} catch (std::invalid_argument) {
} catch (const std::invalid_argument &) {
app->sendResponse(Response("Invalid ID.", Response::Error));
return;
} catch (std::out_of_range) {
} catch (const std::out_of_range &) {
app->sendResponse(Response("Out of range ID.", Response::Error));
return;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment