From e2242f57e01330fc5b1f0e336bdf6ce619fb6b46 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Sun, 8 Nov 2015 00:03:40 +0100 Subject: [PATCH] fix bug in RTCP mux support and fix crash in test --- coreapi/bellesip_sal/sal_sdp.c | 2 +- tester/call_tester.c | 18 ++++++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/coreapi/bellesip_sal/sal_sdp.c b/coreapi/bellesip_sal/sal_sdp.c index 97f9d9ac2..3d5934f1c 100644 --- a/coreapi/bellesip_sal/sal_sdp.c +++ b/coreapi/bellesip_sal/sal_sdp.c @@ -785,7 +785,7 @@ static SalStreamDescription * sdp_to_stream_description(SalMediaDescription *md, stream->dir=md->dir; /*takes default value if not present*/ } - stream->rtcp_mux = belle_sdp_media_description_get_attribute(media_desc, "rtcp_mux") != NULL; + stream->rtcp_mux = belle_sdp_media_description_get_attribute(media_desc, "rtcp-mux") != NULL; /* Get media payload types */ sdp_parse_payload_types(media_desc, stream); diff --git a/tester/call_tester.c b/tester/call_tester.c index 80353aa22..2f30ed478 100644 --- a/tester/call_tester.c +++ b/tester/call_tester.c @@ -2797,8 +2797,8 @@ void call_base_with_configfile(LinphoneMediaEncryption mode, bool_t enable_video if (enable_tunnel) { int i; LinphoneTunnelConfig * tunnel_config = linphone_tunnel_config_new(); - linphone_tunnel_config_set_host(tunnel_config,"tunnel.linphone.org"); - linphone_tunnel_config_set_port(tunnel_config,443); + linphone_tunnel_config_set_host(tunnel_config, "tunnel.linphone.org"); + linphone_tunnel_config_set_port(tunnel_config, 443); linphone_tunnel_add_server(linphone_core_get_tunnel(marie->lc),tunnel_config); linphone_tunnel_enable_sip(linphone_core_get_tunnel(marie->lc),FALSE); linphone_tunnel_set_mode(linphone_core_get_tunnel(marie->lc),LinphoneTunnelModeEnable); @@ -2832,9 +2832,19 @@ void call_base_with_configfile(LinphoneMediaEncryption mode, bool_t enable_video /*wait for SAS*/ int i; for (i=0;i<100;i++) { - if (linphone_call_get_authentication_token(linphone_core_get_current_call(pauline->lc)) + LinphoneCall *pauline_call = linphone_core_get_current_call(pauline->lc); + LinphoneCall *marie_call = linphone_core_get_current_call(marie->lc); + + if (!pauline_call || !marie_call){ + /*if one of the two calls was disapeering, don't crash, but report it*/ + BC_ASSERT_PTR_NOT_NULL(pauline_call); + BC_ASSERT_PTR_NOT_NULL(marie_call); + break; + } + + if (linphone_call_get_authentication_token(pauline_call) && - linphone_call_get_authentication_token(linphone_core_get_current_call(marie->lc))) { + linphone_call_get_authentication_token(marie_call)) { /*check SAS*/ BC_ASSERT_STRING_EQUAL(linphone_call_get_authentication_token(linphone_core_get_current_call(pauline->lc)) ,linphone_call_get_authentication_token(linphone_core_get_current_call(marie->lc)));