Commit c28c8699 authored by Mickaël Turnel's avatar Mickaël Turnel
Browse files

Fix crash when the call is NULL

parent 64fc2849
......@@ -3724,11 +3724,7 @@ static LinphoneCall * get_unique_call(LinphoneCore *lc) {
return call;
}
LinphoneStatus linphone_core_accept_call(LinphoneCore *lc, LinphoneCall *call) {
return linphone_call_accept_with_params(call, NULL);
}
LinphoneStatus linphone_core_accept_call_with_params(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params) {
static LinphoneStatus _linphone_core_accept_call_with_params(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params) {
if (call == NULL) {
call = get_unique_call(lc);
if (call == NULL) {
......@@ -3739,6 +3735,14 @@ LinphoneStatus linphone_core_accept_call_with_params(LinphoneCore *lc, LinphoneC
return linphone_call_accept_with_params(call, params);
}
LinphoneStatus linphone_core_accept_call(LinphoneCore *lc, LinphoneCall *call) {
return _linphone_core_accept_call_with_params(lc, call, NULL);
}
LinphoneStatus linphone_core_accept_call_with_params(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params) {
return _linphone_core_accept_call_with_params(lc, call, params);
}
LinphoneStatus linphone_core_redirect_call(LinphoneCore *lc, LinphoneCall *call, const char *redirect_uri) {
return linphone_call_redirect(call, redirect_uri);
}
......
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