]> sjero.net Git - linphone/commitdiff
workaround un-answered refresh request !
authorSimon Morlat <simon.morlat@linphone.org>
Wed, 17 Mar 2010 11:07:26 +0000 (12:07 +0100)
committerSimon Morlat <simon.morlat@linphone.org>
Wed, 17 Mar 2010 11:07:26 +0000 (12:07 +0100)
coreapi/linphonecore.c
coreapi/sal_eXosip2_presence.c
mediastreamer2

index 35efadc5601ec87c3dcbb8dfbcb96beba0943fea..2e5c78f364f532e46f30a977483dab7b545c434f 100644 (file)
@@ -2105,20 +2105,24 @@ static RtpProfile *make_profile(LinphoneCore *lc, const SalStreamDescription *de
        const MSList *elem;
        RtpProfile *prof=rtp_profile_new("Call profile");
        bool_t first=TRUE;
-       if (desc->type==SalAudio){
-               bw=get_min_bandwidth(lc->up_audio_bw,desc->bandwidth);
-       }
-       else bw=get_min_bandwidth(lc->up_video_bw,desc->bandwidth);
+       
        for(elem=desc->payloads;elem!=NULL;elem=elem->next){
                PayloadType *pt=(PayloadType*)elem->data;
-               if (bw>0) pt->normal_bitrate=bw*1000;
-               else if (desc->type==SalAudio){
-                       pt->normal_bitrate=-1;
-               }
+       
                if (first) {
+                       if (desc->type==SalAudio){
+                               linphone_core_update_allocated_audio_bandwidth_in_call(lc,pt);
+                       }
                        *used_pt=payload_type_get_number(pt);
                        first=FALSE;
                }
+               if (desc->type==SalAudio){                      
+                               bw=get_min_bandwidth(lc->up_audio_bw,desc->bandwidth);
+               }else bw=get_min_bandwidth(lc->up_video_bw,desc->bandwidth);
+               if (bw>0) pt->normal_bitrate=bw*1000;
+               else if (desc->type==SalAudio){
+                       pt->normal_bitrate=-1;
+               }
                if (desc->ptime>0){
                        char tmp[40];
                        snprintf(tmp,sizeof(tmp),"ptime=%i",desc->ptime);
index 9e77a173a59e0a27068c4c1312712ec3807a6928..9d56410242e17e48a1341767c151187d737e05c6 100644 (file)
@@ -127,8 +127,8 @@ int sal_unsubscribe(SalOp *op){
 int sal_subscribe_accept(SalOp *op){
        osip_message_t *msg;
        eXosip_lock();
-       eXosip_insubscription_build_answer(op->tid,200,&msg);
-       eXosip_insubscription_send_answer(op->tid,200,msg);
+       eXosip_insubscription_build_answer(op->tid,202,&msg);
+       eXosip_insubscription_send_answer(op->tid,202,msg);
        eXosip_unlock();
        return 0;
 }
@@ -623,7 +623,14 @@ void sal_exosip_subscription_recv(Sal *sal, eXosip_event_t *ev){
                        ev->did=op->did;
                        ev->nid=op->nid;
                        sal_exosip_subscription_closed(sal,ev);
-               }else ms_warning("Probably a refresh subscribe");
+               }else {
+                       osip_message_t *msg=NULL;
+                       ms_warning("Probably a refresh subscribe");
+                       eXosip_lock();
+                       eXosip_insubscription_build_answer(ev->tid,202,&msg);
+                       eXosip_insubscription_send_answer(ev->tid,202,msg);
+                       eXosip_unlock();
+               }
        }else _sal_exosip_subscription_recv(sal,ev);
 }
 
index 5bcbcae29d9cf6d22b4f6880489eafa98e100008..6d48f5ac0b1e1df8f455c7b26824dae631663cc8 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 5bcbcae29d9cf6d22b4f6880489eafa98e100008
+Subproject commit 6d48f5ac0b1e1df8f455c7b26824dae631663cc8