]> sjero.net Git - linphone/commitdiff
fix config storage for ptimes (was not consistent)
authorSimon Morlat <simon.morlat@linphone.org>
Mon, 10 Sep 2012 19:25:21 +0000 (21:25 +0200)
committerSimon Morlat <simon.morlat@linphone.org>
Mon, 10 Sep 2012 19:26:32 +0000 (21:26 +0200)
coreapi/linphonecall.c
coreapi/linphonecore.c
coreapi/private.h

index da2a461e0c352c6c0cd87eadd939fdcf3aba32fe..41b39cb8b904661620a68605fb2653b5b012eac1 100644 (file)
@@ -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);
index e4f35e3873cc4bbdf79468e4533b83c656f09136..f8a33de57383b4803ad5e9b5ebe07c73cccaf006 100644 (file)
@@ -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);
 }
 
 /**
index 6affd1599fc70f8dfd710b0b5bbcb4770bc4dd4a..7fbc6d8cb1dfb660631cc246b58f06a4303dd41a 100644 (file)
@@ -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;