diff --git a/configure.ac b/configure.ac index 7fa090c03..adeed8e58 100644 --- a/configure.ac +++ b/configure.ac @@ -271,6 +271,32 @@ if test "$build_upnp" != "false" ; then AC_DEFINE(BUILD_UPNP, 1, [Define if upnp enabled]) fi +dnl check zlib +PKG_CHECK_MODULES(ZLIB, [zlib], [found_zlib=yes], [found_zlib=no]) +if test "x$found_zlib" = "xno" ; then + AC_CHECK_LIB(z, inflate, + [AC_CHECK_HEADER([zlib.h], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[ + #include + #if !defined(ZLIB_VERNUM) || (ZLIB_VERNUM < 0x1230) + // compile error + #endif + ]],[])], + [found_zlib=yes])])]) + if test "x$found_zlib" = "xno" ; then + AC_MSG_NOTICE([zlib library and headers not found]) + else + AC_DEFINE( HAVE_ZLIB, 1, [ZLIB support] ) + ZLIBS_LIBS='-z' + AC_SUBST(ZLIB_LIBS) + fi +else + AC_MSG_NOTICE([ZLIB found]) + AC_DEFINE( HAVE_ZLIB, 1, [ZLIB support] ) +fi + + dnl check libxml2 PKG_CHECK_MODULES(LIBXML2, [libxml-2.0],[libxml2_found=yes],foo=bar) if test "$libxml2_found" != "yes" ; then @@ -959,6 +985,7 @@ printf "* %-30s %s\n" "zRTP encryption" $zrtp printf "* %-30s %s\n" "DTLS encryption" $dtls printf "* %-30s %s\n" "uPnP support" $build_upnp printf "* %-30s %s\n" "LDAP support" $enable_ldap +printf "* %-30s %s\n" "ZLIB support" $found_zlib if test "$enable_tunnel" = "true" ; then printf "* %-30s %s\n" "Tunnel support" "true" diff --git a/mediastreamer2 b/mediastreamer2 index ecb9b4834..c837c019d 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit ecb9b4834648e03814bf7b89e1cb732d187ffe30 +Subproject commit c837c019d5b1ff5e6ba35ba76e6d9b9ad5d1cd51 diff --git a/oRTP b/oRTP index 9efb47406..dffa5e73c 160000 --- a/oRTP +++ b/oRTP @@ -1 +1 @@ -Subproject commit 9efb474063d2f3053e2a6149d41a8b86e54f0c68 +Subproject commit dffa5e73c4e6228766426efd23ff42130ef6c731 diff --git a/tester/call_tester.c b/tester/call_tester.c index e23e2cbae..e8c96dc39 100644 --- a/tester/call_tester.c +++ b/tester/call_tester.c @@ -26,6 +26,7 @@ #include "private.h" #include "liblinphone_tester.h" #include "mediastreamer2/dsptools.h" +#include "belle-sip/sipstack.h" #ifdef WIN32 #define unlink _unlink @@ -376,6 +377,49 @@ static void simple_call(void) { } } +static void call_with_timeouted_bye(void) { + int begin; + int leaked_objects; + LinphoneCoreManager* marie; + LinphoneCoreManager* pauline; + belle_sip_timer_config_t timer_config; + belle_sip_object_enable_leak_detector(TRUE); + begin=belle_sip_object_get_object_count(); + + marie = linphone_core_manager_new( "marie_rc"); + pauline = linphone_core_manager_new( "pauline_rc"); + + CU_ASSERT_TRUE(call(marie,pauline)); + + sal_set_send_error(pauline->lc->sal,1500); /*to trash the message without generating error*/ + timer_config.T1=50; /*to have timer F = 3s*/ + timer_config.T2=4000; + timer_config.T3=0; + timer_config.T4=5000; + + belle_sip_stack_set_timer_config(sal_get_belle_sip_stack(pauline->lc->sal),&timer_config); + linphone_core_terminate_all_calls(pauline->lc); + + CU_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&pauline->stat.number_of_LinphoneCallEnd,1)); + CU_ASSERT_TRUE(wait_for_until(pauline->lc,marie->lc,&pauline->stat.number_of_LinphoneCallReleased,1,timer_config.T1*84)); + + sal_set_send_error(pauline->lc->sal,0); + + linphone_core_terminate_all_calls(marie->lc); + CU_ASSERT_TRUE(wait_for_until(pauline->lc,marie->lc,&marie->stat.number_of_LinphoneCallEnd,1,5000)); + CU_ASSERT_TRUE(wait_for_until(pauline->lc,marie->lc,&marie->stat.number_of_LinphoneCallReleased,1,5000)); + + linphone_core_manager_destroy(marie); + linphone_core_manager_destroy(pauline); + + leaked_objects=belle_sip_object_get_object_count()-begin; + CU_ASSERT_TRUE(leaked_objects==0); + if (leaked_objects>0){ + belle_sip_object_dump_active_objects(); + } +} + + static void direct_call_over_ipv6(){ LinphoneCoreManager* marie; LinphoneCoreManager* pauline; @@ -3500,6 +3544,7 @@ test_t call_tests[] = { { "Cancelled ringing call", cancelled_ringing_call }, { "Call failed because of codecs", call_failed_because_of_codecs }, { "Simple call", simple_call }, + { "Call with timeouted bye", call_with_timeouted_bye }, { "Direct call over IPv6", direct_call_over_ipv6}, { "Outbound call with multiple proxy possible", call_outbound_with_multiple_proxy }, { "Audio call recording", audio_call_recording_test },