Allow unsetting default proxy config.

This commit is contained in:
Guillaume Beraudo 2014-03-06 11:20:29 +01:00
parent 92747748af
commit cf3c3a5601
2 changed files with 4 additions and 2 deletions

View file

@ -424,7 +424,8 @@ public interface LinphoneCore {
* Sets the default proxy.
*<br>
* This default proxy must be part of the list of already entered {@link LinphoneProxyConfig}.
* Toggling it as default will make LinphoneCore use the identity associated with the proxy configuration in all incoming and outgoing calls.
* Toggling it as default will make LinphoneCore favor the identity associated with the proxy configuration in all incoming and outgoing calls.
* Better proxy configuration match may override this choice. Pass null to unset the default proxy.
* @param proxyCfg
*/
public void setDefaultProxyConfig(LinphoneProxyConfig proxyCfg);

View file

@ -207,7 +207,8 @@ class LinphoneCoreImpl implements LinphoneCore {
public synchronized void setDefaultProxyConfig(LinphoneProxyConfig proxyCfg) {
isValid();
setDefaultProxyConfig(nativePtr,((LinphoneProxyConfigImpl)proxyCfg).nativePtr);
long proxyPtr=proxyCfg != null ? ((LinphoneProxyConfigImpl)proxyCfg).nativePtr : 0;
setDefaultProxyConfig(nativePtr, proxyPtr);
}
public synchronized void addProxyConfig(LinphoneProxyConfig proxyCfg) throws LinphoneCoreException{
isValid();