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

Fix crash when accessing stun server in core

parent 852166f0
Pipeline #203 failed with stage
in 0 seconds
......@@ -2237,7 +2237,7 @@ void MediaSessionPrivate::handleIceEvents (OrtpEvent *ev) {
iceAgent->updateIceStateInCallStats();
} else if (evt == ORTP_EVENT_ICE_GATHERING_FINISHED) {
if (!evd->info.ice_processing_successful)
lWarning() << "No STUN answer from [" << linphone_core_get_stun_server(q->getCore()->getCCore()) << "], continuing without STUN";
lWarning() << "No STUN answer from [" << linphone_nat_policy_get_stun_server(q->getPrivate()->getNatPolicy()) << "], continuing without STUN";
iceAgent->gatheringFinished();
switch (state) {
case CallSession::State::Updating:
......
......@@ -6025,6 +6025,14 @@ static void call_with_ice_stun_not_responding(void){
/*we expect ICE to continue without stun candidates*/
_call_with_ice_base(marie, pauline, TRUE, TRUE, TRUE, FALSE);
/*retry but with nat policy instead of core */
linphone_core_set_stun_server(marie->lc, NULL);
linphone_core_set_stun_server(pauline->lc, NULL);
linphone_nat_policy_set_stun_server(linphone_core_get_nat_policy(marie->lc), "belledonne-communications.com:443");
linphone_nat_policy_set_stun_server(linphone_core_get_nat_policy(pauline->lc), "belledonne-communications.com:443");
/*we expect ICE to continue without stun candidates*/
_call_with_ice_base(marie, pauline, TRUE, TRUE, TRUE, FALSE);
linphone_core_manager_destroy(marie);
linphone_core_manager_destroy(pauline);
}
......
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