Commit 2fb4ce6f authored by Simon Morlat's avatar Simon Morlat

add test showing that ICE is deactivated if stun server is not responding.

To be fixed later.
parent a029a954
......@@ -185,6 +185,17 @@ void linphone_nat_policy_set_stun_server(LinphoneNatPolicy *policy, const char *
if (new_stun_server != NULL) {
policy->stun_server = new_stun_server;
}
if (policy->stun_addrinfo) {
bctbx_freeaddrinfo(policy->stun_addrinfo);
policy->stun_addrinfo = NULL;
}
if (policy->stun_resolver_context){
belle_sip_resolver_context_cancel(policy->stun_resolver_context);
belle_sip_object_unref(policy->stun_resolver_context);
policy->stun_resolver_context = NULL;
}
linphone_nat_policy_resolve_stun_server(policy);
}
const char * linphone_nat_policy_get_stun_server_username(const LinphoneNatPolicy *policy) {
......
......@@ -5880,6 +5880,22 @@ static void call_with_ice_without_stun2(void){
linphone_core_manager_destroy(pauline);
}
#if 0
static void call_with_ice_stun_not_responding(void){
LinphoneCoreManager * marie = linphone_core_manager_new( "marie_rc");
LinphoneCoreManager *pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
/*set dummy stun servers*/
linphone_core_set_stun_server(marie->lc, "belledonne-communications.com:443");
linphone_core_set_stun_server(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);
}
#endif
static void call_with_zrtp_configured_calling_side(void) {
LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
......@@ -6490,6 +6506,7 @@ test_t call_tests[] = {
TEST_ONE_TAG("Call with ICE with default candidate not stun", call_with_ice_with_default_candidate_not_stun, "ICE"),
TEST_ONE_TAG("Call with ICE without stun server", call_with_ice_without_stun, "ICE"),
TEST_ONE_TAG("Call with ICE without stun server one side", call_with_ice_without_stun2, "ICE"),
/*TEST_ONE_TAG("Call with ICE and stun server not responding", call_with_ice_stun_not_responding, "ICE"),*/
TEST_NO_TAG("Call with ZRTP configured calling side only", call_with_zrtp_configured_calling_side),
TEST_NO_TAG("Call with ZRTP configured receiver side only", call_with_zrtp_configured_callee_side),
TEST_NO_TAG("Call from plain RTP to ZRTP mandatory should be silent", call_from_plain_rtp_to_zrtp),
......
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