]> sjero.net Git - linphone/commitdiff
Merge remote-tracking branch 'origin/master' into dev_videoios
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@linphone.org>
Tue, 16 Aug 2011 10:07:50 +0000 (12:07 +0200)
committerPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@linphone.org>
Tue, 16 Aug 2011 10:07:50 +0000 (12:07 +0200)
Conflicts:
coreapi/linphonecall.c
coreapi/linphonecore.c
coreapi/proxy.c
coreapi/sal.c
coreapi/sal_eXosip2.c
coreapi/sal_eXosip2.h
java/common/org/linphone/core/LinphoneCall.java
mediastreamer2

1  2 
coreapi/linphonecore.c
mediastreamer2

diff --combined coreapi/linphonecore.c
index 29880528789ca66354a34953b3d9eec891afe012,0d7a33ccc8bcd4b1b5204d06d75749d00874a537..116fc4dffce25dd339683ced8ad09d3cce61c7bf
@@@ -487,6 -487,11 +487,11 @@@ static void sip_config_read(LinphoneCor
        } else {
                tr.tcp_port=lp_config_get_int(lc->config,"sip","sip_tcp_port",0);
        }
+       if (lp_config_get_int(lc->config,"sip","sip_tls_random_port",0)) {
+               tr.tls_port=(0xDFF&+random())+1024;
+       } else {
+               tr.tls_port=lp_config_get_int(lc->config,"sip","sip_tls_port",0);
+       }
        /*start listening on ports*/
        linphone_core_set_sip_transports(lc,&tr);
  
                ms_free(contact);
        }
  
+       sal_root_ca(lc->sal, lp_config_get_string(lc->config,"sip","root_ca", "/etc/ssl/certs"));
        tmp=lp_config_get_int(lc->config,"sip","guess_hostname",1);
        linphone_core_set_guess_hostname(lc,tmp);
  
@@@ -948,7 -955,6 +955,7 @@@ static void linphone_core_init (Linphon
        linphone_core_assign_payload_type(&payload_type_pcmu8000,0,NULL);
        linphone_core_assign_payload_type(&payload_type_gsm,3,NULL);
        linphone_core_assign_payload_type(&payload_type_pcma8000,8,NULL);
 +      linphone_core_assign_payload_type(&payload_type_g722,9,NULL);
        linphone_core_assign_payload_type(&payload_type_lpc1015,115,NULL);
        linphone_core_assign_payload_type(&payload_type_speex_nb,110,"vbr=on");
        linphone_core_assign_payload_type(&payload_type_speex_wb,111,"vbr=on");
        linphone_core_assign_payload_type(&payload_type_mp4v,99,"profile-level-id=3");
        linphone_core_assign_payload_type(&payload_type_x_snow,100,NULL);
        linphone_core_assign_payload_type(&payload_type_h264,102,"profile-level-id=428014");
+       linphone_core_assign_payload_type(&payload_type_vp8,103,NULL);
        /* due to limited space in SDP, we have to disable this h264 line which is normally no more necessary */
        /* linphone_core_assign_payload_type(&payload_type_h264,103,"packetization-mode=1;profile-level-id=428014");*/
  #endif
@@@ -1359,7 -1366,7 +1367,7 @@@ void linphone_core_set_use_rfc2833_for_
  int linphone_core_get_sip_port(LinphoneCore *lc)
  {
        LCSipTransports *tr=&lc->sip_conf.transports;
-       return tr->udp_port>0 ? tr->udp_port : tr->tcp_port;
+       return tr->udp_port>0 ? tr->udp_port : (tr->tcp_port > 0 ? tr->tcp_port : tr->tls_port);
  }
  
  static char _ua_name[64]="Linphone";
@@@ -1420,13 -1427,18 +1428,18 @@@ static int apply_transports(LinphoneCor
        sal_unlisten_ports (sal);
        if (tr->udp_port>0){
                if (sal_listen_port (sal,anyaddr,tr->udp_port,SalTransportUDP,FALSE)!=0){
-                       transport_error(lc,"UDP",tr->udp_port);
+                       transport_error(lc,"udp",tr->udp_port);
                        return -1;
                }
        }
        if (tr->tcp_port>0){
                if (sal_listen_port (sal,anyaddr,tr->tcp_port,SalTransportTCP,FALSE)!=0){
-                       transport_error(lc,"TCP",tr->tcp_port);
+                       transport_error(lc,"tcp",tr->tcp_port);
+               }
+       }
+       if (tr->tls_port>0){
+               if (sal_listen_port (sal,anyaddr,tr->tls_port,SalTransportTLS,TRUE)!=0){
+                       transport_error(lc,"tls",tr->tls_port);
                }
        }
        apply_user_agent(lc);
@@@ -2186,8 -2198,6 +2199,8 @@@ int linphone_core_update_call(LinphoneC
  #ifdef VIDEO_ENABLED
                if (call->videostream!=NULL){
                        video_stream_set_sent_video_size(call->videostream,linphone_core_get_preferred_video_size(lc));
 +                      if (call->camera_active)
 +                              call->videostream->cam=lc->video_conf.device; /*to take into account eventual cam changes*/
                        video_stream_update_video_params (call->videostream);
                }
  #endif
@@@ -2891,6 -2901,18 +2904,18 @@@ const char *linphone_core_get_ring(cons
        return lc->sound_conf.local_ring;
  }
  
+ /**
+  * Sets the path to a file or folder containing trusted root CAs (PEM format)
+  *
+  * @param path
+  * @param lc The LinphoneCore object
+  *
+  * @ingroup media_parameters
+ **/
+ void linphone_core_set_root_ca(LinphoneCore *lc,const char *path){
+       sal_root_ca(lc->sal, path);
+ }
  static void notify_end_of_ring(void *ud, MSFilter *f, unsigned int event, void *arg){
        LinphoneCore *lc=(LinphoneCore*)ud;
        lc->preview_finished=1;
@@@ -3425,13 -3447,7 +3450,13 @@@ unsigned long linphone_core_get_native_
   * If not set the core will create its own window.
  **/
  void linphone_core_set_native_preview_window_id(LinphoneCore *lc, unsigned long id){
 +#ifdef VIDEO_ENABLED
        lc->preview_window_id=id;
 +      LinphoneCall *call=linphone_core_get_current_call(lc);
 +      if (call!=NULL && call->videostream){
 +              video_stream_set_native_preview_window_id(call->videostream,id);
 +      }
 +#endif
  }
  
  /**
@@@ -3755,6 -3771,7 +3780,7 @@@ void sip_config_uninit(LinphoneCore *lc
        sip_config_t *config=&lc->sip_conf;
        lp_config_set_int(lc->config,"sip","sip_port",config->transports.udp_port);
        lp_config_set_int(lc->config,"sip","sip_tcp_port",config->transports.tcp_port);
+       lp_config_set_int(lc->config,"sip","sip_tls_port",config->transports.tls_port);
        lp_config_set_int(lc->config,"sip","guess_hostname",config->guess_hostname);
        lp_config_set_string(lc->config,"sip","contact",config->contact);
        lp_config_set_int(lc->config,"sip","inc_timeout",config->inc_timeout);
@@@ -4219,4 -4236,9 +4245,9 @@@ void linphone_core_remove_iterate_hook(
        ms_error("linphone_core_remove_iterate_hook(): No such hook found.");
  }
  
+ void linphone_core_set_zrtp_secrets_file(LinphoneCore *lc, const char* file){
+       if (lc->zrtp_secrets_cache != NULL) {
+               ms_free(lc->zrtp_secrets_cache);
+       }
+       lc->zrtp_secrets_cache=file ? ms_strdup(file) : NULL;
+ }
diff --combined mediastreamer2
index 187a2132cebc630086384bfa8c7a9a50b260cbaf,548c7012382db6442a2ec75f4d9ff8f67c853244..e297622976e5dcae7ec9de1233178149d30b42ad
@@@ -1,1 -1,1 +1,1 @@@
- Subproject commit 187a2132cebc630086384bfa8c7a9a50b260cbaf
 -Subproject commit 548c7012382db6442a2ec75f4d9ff8f67c853244
++Subproject commit e297622976e5dcae7ec9de1233178149d30b42ad