From a3f96a73cb84ff0a58f8497a5f51f3c83100e4fc Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Tue, 8 Jul 2014 08:33:02 +0200 Subject: [PATCH] add config param to disable vfu request --- coreapi/linphonecall.c | 11 +++++++---- coreapi/linphonecore.c | 1 + coreapi/private.h | 1 + 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index 5ed1b3c24..d78867bfd 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -1278,11 +1278,14 @@ void linphone_call_enable_camera (LinphoneCall *call, bool_t enable){ /** * Request remote side to send us a Video Fast Update. **/ -void linphone_call_send_vfu_request(LinphoneCall *call) -{ +void linphone_call_send_vfu_request(LinphoneCall *call) { #ifdef VIDEO_ENABLED - if (LinphoneCallStreamsRunning == linphone_call_get_state(call)) - sal_call_send_vfu_request(call->op); + if (call->core->sip_conf.vfu_with_info) { + if (LinphoneCallStreamsRunning == linphone_call_get_state(call)) + sal_call_send_vfu_request(call->op); + } else { + ms_message("vfu request using sip disabled from config [sip,vfu_with_info]"); + } #endif } diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 76a75f93c..276dd82f7 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -755,6 +755,7 @@ static void sip_config_read(LinphoneCore *lc) sal_use_one_matching_codec_policy(lc->sal,lp_config_get_int(lc->config,"sip","only_one_codec",0)); sal_use_dates(lc->sal,lp_config_get_int(lc->config,"sip","put_date",0)); sal_enable_sip_update_method(lc->sal,lp_config_get_int(lc->config,"sip","sip_update",1)); + lc->sip_conf.vfu_with_info=lp_config_get_int(lc->config,"sip","vfu_with_info",1); } static void rtp_config_read(LinphoneCore *lc) diff --git a/coreapi/private.h b/coreapi/private.h index 4722b4849..32e013c94 100644 --- a/coreapi/private.h +++ b/coreapi/private.h @@ -524,6 +524,7 @@ typedef struct sip_config bool_t ping_with_options; bool_t auto_net_state_mon; bool_t tcp_tls_keepalive; + bool_t vfu_with_info; /*use to enable vfu request using sip info*/ } sip_config_t; typedef struct rtp_config