From b74aa1f56a6c209e9679cb40431892189fcb722c Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Mon, 21 Apr 2014 10:35:47 +0200 Subject: [PATCH] fix audio-only build --- coreapi/linphonecore.c | 2 +- tester/call_tester.c | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index bc52d67fa..dbd8eb07a 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -3277,7 +3277,7 @@ int linphone_core_accept_call_update(LinphoneCore *lc, LinphoneCall *call, const int _linphone_core_accept_call_update(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params){ SalMediaDescription *remote_desc; bool_t keep_sdp_version; -#ifdef VIDEO_ENABLED +#if defined(VIDEO_ENABLED) && defined(BUILD_UPNP) bool_t old_has_video = call->params.has_video; #endif diff --git a/tester/call_tester.c b/tester/call_tester.c index 928ce6484..facec8769 100644 --- a/tester/call_tester.c +++ b/tester/call_tester.c @@ -1245,7 +1245,6 @@ static void call_with_declined_srtp(void) { } static void call_base(LinphoneMediaEncryption mode, bool_t enable_video,bool_t enable_relay,LinphoneFirewallPolicy policy) { - int i=0; LinphoneCoreManager* marie = linphone_core_manager_new( "marie_rc"); LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_rc"); if (enable_relay) { @@ -1288,6 +1287,7 @@ static void call_base(LinphoneMediaEncryption mode, bool_t enable_video,bool_t e CU_ASSERT_TRUE(check_ice(pauline,marie,LinphoneIceStateHostConnection)); #ifdef VIDEO_ENABLED if (enable_video) { + int i=0; if (linphone_core_video_supported(marie->lc)) { for (i=0;i<100;i++) { /*fixme to workaround a crash*/ ms_usleep(20000); @@ -1321,15 +1321,19 @@ static void call_base(LinphoneMediaEncryption mode, bool_t enable_video,bool_t e linphone_core_manager_destroy(pauline); } +#ifdef VIDEO_ENABLED static void srtp_video_ice_call(void) { call_base(LinphoneMediaEncryptionSRTP,TRUE,FALSE,LinphonePolicyUseIce); } -static void srtp_ice_call(void) { - call_base(LinphoneMediaEncryptionSRTP,FALSE,FALSE,LinphonePolicyUseIce); -} static void zrtp_video_ice_call(void) { call_base(LinphoneMediaEncryptionZRTP,TRUE,FALSE,LinphonePolicyUseIce); } +#endif + +static void srtp_ice_call(void) { + call_base(LinphoneMediaEncryptionSRTP,FALSE,FALSE,LinphonePolicyUseIce); +} + static void zrtp_ice_call(void) { call_base(LinphoneMediaEncryptionZRTP,FALSE,FALSE,LinphonePolicyUseIce); }