From c5f1290f25bf45a3871a02385af0fd6afeafba44 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Mon, 10 Sep 2012 21:25:21 +0200 Subject: [PATCH] fix config storage for ptimes (was not consistent) --- coreapi/linphonecall.c | 2 +- coreapi/linphonecore.c | 4 ++-- coreapi/private.h | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index da2a461e0..41b39cb8b 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -223,7 +223,7 @@ static SalMediaDescription *_create_local_media_description(LinphoneCore *lc, Li if (call->params.down_ptime) md->streams[0].ptime=call->params.down_ptime; else - md->streams[0].ptime=lc->net_conf.down_ptime; + md->streams[0].ptime=linphone_core_get_download_ptime(lc); l=make_codec_list(lc,lc->codecs_conf.audio_codecs,call->params.audio_bw,&md->streams[0].max_rate); pt=payload_type_clone(rtp_profile_get_payload_from_mime(&av_profile,"telephone-event")); l=ms_list_append(l,pt); diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index e4f35e387..f8a33de57 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -967,14 +967,14 @@ int linphone_core_get_upload_bandwidth(const LinphoneCore *lc){ * Set audio packetization time linphone expects to receive from peer */ void linphone_core_set_download_ptime(LinphoneCore *lc, int ptime) { - lc->net_conf.down_ptime=ptime; + lp_config_set_int(lc->config,"rtp","download_ptime",ptime); } /** * Get audio packetization time linphone expects to receive from peer */ int linphone_core_get_download_ptime(LinphoneCore *lc) { - return lc->net_conf.down_ptime; + return lp_config_get_int(lc->config,"rtp","download_ptime",0); } /** diff --git a/coreapi/private.h b/coreapi/private.h index 6affd1599..7fbc6d8cb 100644 --- a/coreapi/private.h +++ b/coreapi/private.h @@ -409,7 +409,6 @@ typedef struct net_config int upload_bw; int firewall_policy; int mtu; - int down_ptime; bool_t nat_sdp_only; }net_config_t;