]> sjero.net Git - linphone/commitdiff
Merge branch 'master' of git.sv.gnu.org:/srv/git/linphone
authorJehan Monnier <jehan.monnier@linphone.org>
Thu, 17 Feb 2011 16:41:56 +0000 (17:41 +0100)
committerJehan Monnier <jehan.monnier@linphone.org>
Thu, 17 Feb 2011 16:41:56 +0000 (17:41 +0100)
1  2 
coreapi/linphonecore.c
coreapi/sal_eXosip2.c

diff --combined coreapi/linphonecore.c
index 8db39dd515dca06602be1d1226db6892aae0bcbb,9156fe40ee8d9927a2d8e82eb5e740dde16d5f5f..7b6a01640f783df256b1f55773cd3f4a7db7da7c
@@@ -2716,6 -2716,7 +2716,7 @@@ static MSSndCard *get_card_from_string_
   * Returns true if the specified sound device can capture sound.
   *
   * @ingroup media_parameters
+  * @param lc The LinphoneCore object
   * @param devid the device name as returned by linphone_core_get_sound_devices()
  **/
  bool_t linphone_core_sound_device_can_capture(LinphoneCore *lc, const char *devid){
   * Returns true if the specified sound device can play sound.
   *
   * @ingroup media_parameters
+  * @param lc The LinphoneCore object
   * @param devid the device name as returned by linphone_core_get_sound_devices()
  **/
  bool_t linphone_core_sound_device_can_playback(LinphoneCore *lc, const char *devid){
   * Sets the sound device used for ringing.
   *
   * @ingroup media_parameters
+  * @param lc The LinphoneCore object
   * @param devid the device name as returned by linphone_core_get_sound_devices()
  **/
  int linphone_core_set_ringer_device(LinphoneCore *lc, const char * devid){
   * Sets the sound device used for playback.
   *
   * @ingroup media_parameters
+  * @param lc The LinphoneCore object
   * @param devid the device name as returned by linphone_core_get_sound_devices()
  **/
  int linphone_core_set_playback_device(LinphoneCore *lc, const char * devid){
   * Sets the sound device used for capture.
   *
   * @ingroup media_parameters
+  * @param lc The LinphoneCore object
   * @param devid the device name as returned by linphone_core_get_sound_devices()
  **/
  int linphone_core_set_capture_device(LinphoneCore *lc, const char * devid){
   * Returns the name of the currently assigned sound device for ringing.
   *
   * @ingroup media_parameters
+  * @param lc The LinphoneCore object
  **/
  const char * linphone_core_get_ringer_device(LinphoneCore *lc)
  {
   * Returns the name of the currently assigned sound device for playback.
   *
   * @ingroup media_parameters
+  * @param lc The LinphoneCore object
  **/
  const char * linphone_core_get_playback_device(LinphoneCore *lc)
  {
   * Returns the name of the currently assigned sound device for capture.
   *
   * @ingroup media_parameters
+  * @param lc The LinphoneCore object
  **/
  const char * linphone_core_get_capture_device(LinphoneCore *lc)
  {
  /**
   * Returns an unmodifiable array of available sound devices.
   *
-  * @ingroup media_parameters
   * The array is NULL terminated.
+  *
+  * @ingroup media_parameters
+  * @param lc The LinphoneCore object
  **/
  const char**  linphone_core_get_sound_devices(LinphoneCore *lc){
        build_sound_devices_table(lc);
@@@ -2858,6 -2868,7 +2868,7 @@@ void linphone_core_set_sound_source(Lin
   * Sets the path to a wav file used for ringing.
   *
   * @param path The file must be a wav 16bit linear. Local ring is disabled if null
+  * @param lc The LinphoneCore object
   *
   * @ingroup media_parameters
  **/
@@@ -2875,6 -2886,7 +2886,7 @@@ void linphone_core_set_ring(LinphoneCor
  /**
   * Returns the path to the wav file used for ringing.
   *
+  * @param lc The LinphoneCore object
   * @ingroup media_parameters
  **/
  const char *linphone_core_get_ring(const LinphoneCore *lc){
@@@ -3143,6 -3155,7 +3155,7 @@@ static void toggle_video_preview(Linpho
   * initiate future calls with video or not. The two boolean parameters indicate in which
   * direction video is enabled. Setting both to false disables video entirely.
   *
+  * @param lc The LinphoneCore object
   * @param vcap_enabled indicates whether video capture is enabled
   * @param display_enabled indicates whether video display should be shown
   *
@@@ -3222,6 -3235,7 +3235,7 @@@ bool_t linphone_core_self_view_enabled(
   * Sets the active video device.
   *
   * @ingroup media_parameters
+  * @param lc The LinphoneCore object
   * @param id the name of the video device as returned by linphone_core_get_video_devices()
  **/
  int linphone_core_set_video_device(LinphoneCore *lc, const char *id){
  /**
   * Returns the name of the currently active video device.
   *
+  * @param lc The LinphoneCore object
   * @ingroup media_parameters
  **/
  const char *linphone_core_get_video_device(const LinphoneCore *lc){
@@@ -3904,24 -3919,8 +3919,24 @@@ static void set_network_reachable(Linph
        }
        lc->netup_time=curtime;
        lc->network_reachable=isReachable;
 -}
 +      if(!isReachable) {
 +              sal_unlisten_ports (lc->sal);
 +      } else {
 +              apply_transports(lc);
 +      }
  
 +}
 +void linphone_core_refresh_registers(LinphoneCore* lc) {
 +      const MSList *elem=linphone_core_get_proxy_config_list(lc);
 +      for(;elem!=NULL;elem=elem->next){
 +              LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)elem->data;
 +              if (linphone_proxy_config_register_enabled(cfg) ) {
 +                      cfg->registered=0;
 +                      cfg->commit=TRUE;
 +              }
 +      }
 +      
 +}
  void linphone_core_set_network_reachable(LinphoneCore* lc,bool_t isReachable) {
        //first disable automatic mode
        if (lc->auto_net_state_mon) {
diff --combined coreapi/sal_eXosip2.c
index 222e6e59759613850b5df59bf2593c4c2fc66385,bb098fbe961e6512de73021c2cbd1ef8dcaa0e18..6f2fd8bb12e489945262a149887257528fbe63f9
@@@ -24,6 -24,8 +24,8 @@@ Foundation, Inc., 59 Temple Place - Sui
  #include "private.h"
  #include "offeranswer.h"
  
+ static bool_t call_failure(Sal *sal, eXosip_event_t *ev);
  static void text_received(Sal *sal, eXosip_event_t *ev);
  
  void _osip_list_set_empty(osip_list_t *l, void (*freefunc)(void*)){
@@@ -329,7 -331,6 +331,7 @@@ int sal_unlisten_ports(Sal *ctx)
        if (ctx->running){
                eXosip_quit();
                eXosip_init();
 +              ctx->running=FALSE;
        }
        return 0;
  }
@@@ -1086,8 -1087,9 +1088,9 @@@ static void call_released(Sal *sal, eXo
                ms_warning("No op associated to this call_released()");
                return;
        }
-       if (op->did==-1) {
-               sal->callbacks.call_failure(op,SalErrorNoResponse,SalReasonUnknown,NULL, 487);
+       if (ev->response==NULL){
+               /* no response received so far */
+               call_failure(sal,ev);
        }
        sal->callbacks.call_released(op);
  }
@@@ -1344,9 -1346,11 +1347,11 @@@ static void process_dtmf_relay(Sal *sal
                                        sal->callbacks.dtmf_received(op, tmp[0]);
                        }
                }
+               eXosip_lock();
                eXosip_call_build_answer(ev->tid,200,&ans);
                if (ans)
                        eXosip_call_send_answer(ev->tid,200,ans);
+               eXosip_unlock();
        }
  }
  
@@@ -2031,7 -2035,7 +2036,7 @@@ int sal_call_update(SalOp *h, const cha
        osip_message_t *reinvite=NULL;
  
        eXosip_lock();
-       if(eXosip_call_build_request(h->did,"INVITE",&reinvite) != OSIP_SUCCESS || reinvite==NULL){
+       if(eXosip_call_build_request(h->did,"INVITE",&reinvite) != 0 || reinvite==NULL){
                eXosip_unlock();
                return -1;
        }