]> sjero.net Git - linphone/commitdiff
Merge branch 'master' into dev_sal
authorSimon Morlat <simon.morlat@linphone.org>
Tue, 2 Feb 2010 15:25:52 +0000 (16:25 +0100)
committerSimon Morlat <simon.morlat@linphone.org>
Tue, 2 Feb 2010 15:25:52 +0000 (16:25 +0100)
Conflicts:
coreapi/private.h

1  2 
coreapi/exevents.c

diff --combined coreapi/exevents.c
index c5428bff615095020831eba6ced848ac780fea83,36ed2b6d7e7aeb8f4ade2cf7c9659919c6ebd36b..75dc954ef49a5b7aa103587f084918988e70242d
@@@ -464,8 -464,7 +464,8 @@@ int linphone_set_audio_offer(sdp_contex
        elem=lc->codecs_conf.audio_codecs;
        while(elem!=NULL){
                codec=(PayloadType*) elem->data;
 -              if (linphone_core_check_payload_type_usability(lc,codec) && payload_type_enabled(codec)){
 +              if (linphone_core_check_payload_type_usability(lc,codec) && 
 +                  linphone_core_payload_type_enabled(lc,codec)){
                        sdp_payload_init(&payload);
                        payload.a_rtpmap=ortp_strdup_printf("%s/%i/1",codec->mime_type,codec->clock_rate);
                        payload.pt=rtp_profile_get_payload_number_from_rtpmap(lc->local_profile,payload.a_rtpmap);
@@@ -536,8 -535,7 +536,8 @@@ int linphone_set_video_offer(sdp_contex
  
        for(elem=lc->codecs_conf.video_codecs;elem!=NULL;elem=ms_list_next(elem)){
                codec=(PayloadType*) elem->data;
 -              if (linphone_core_check_payload_type_usability(lc,codec) && payload_type_enabled(codec)){
 +              if (linphone_core_check_payload_type_usability(lc,codec) && 
 +                  linphone_core_payload_type_enabled(lc,codec)){
                        sdp_payload_t payload;
                        sdp_payload_init(&payload);
                        payload.line=1;
@@@ -589,7 -587,7 +589,7 @@@ SupportLevel linphone_payload_is_suppor
                                ms_warning("payload %s is not usable",rtppayload->mime_type);
                                return Unsupported;
                        }
 -                      if ( !payload_type_enabled(rtppayload)) {
 +                      if ( !linphone_core_payload_type_enabled(lc,rtppayload)) {
                                ms_warning("payload %s is not enabled.",rtppayload->mime_type);
                                return Unsupported;
                        }
@@@ -968,7 -966,7 +968,7 @@@ void linphone_registration_faillure(Lin
                                updated contact first, just in case the faillure is due to incorrect contact */
                        if (linphone_proxy_config_register_again_with_updated_contact(cfg,ev->request,ev->response))
                                return; /*we are retrying with an updated contact*/
-                       if (status_code==403) linphone_proxy_config_process_authentication_failure(lc,ev);
+                       linphone_proxy_config_process_authentication_failure(lc,status_code,ev);
                        osip_uri_to_str(requri,&ru);
                        msg=ortp_strdup_printf(_("Registration on %s failed: %s"),ru,(reason!=NULL) ? reason : _("no response timeout"));
                        lc->vtable.display_status(lc,msg);
@@@ -988,12 -986,13 +988,13 @@@ void linphone_registration_success(Linp
        cfg=linphone_core_get_proxy_config_from_rid(lc,ev->rid);
        ms_return_if_fail(cfg!=NULL);
  
-       gstate_new_state(lc, GSTATE_REG_OK, NULL);
        osip_message_get_expires(ev->request,0,&h);
        if (h!=NULL && atoi(h->hvalue)!=0){
                cfg->registered=TRUE;
                linphone_proxy_config_register_again_with_updated_contact(cfg,ev->request,ev->response);
        }else cfg->registered=FALSE;
+       
+       gstate_new_state(lc, GSTATE_REG_OK, NULL);
  
        osip_uri_to_str(requri,&ru);
        if (cfg->registered) msg=ms_strdup_printf(_("Registration on %s successful."),ru);