Start tunnel automatically when settings change instead of waiting for restart
This commit is contained in:
parent
8dca1f32b7
commit
c62efa6a9d
2 changed files with 4 additions and 1 deletions
|
@ -485,7 +485,7 @@ public class LinphoneManager implements LinphoneCoreListener {
|
|||
}
|
||||
}
|
||||
|
||||
private void initTunnelFromConf() {
|
||||
public void initTunnelFromConf() {
|
||||
if (!mLc.isTunnelAvailable())
|
||||
return;
|
||||
|
||||
|
|
|
@ -778,6 +778,7 @@ public class LinphonePreferences {
|
|||
|
||||
public void setTunnelMode(String mode) {
|
||||
getConfig().setString("app", "tunnel", mode);
|
||||
LinphoneManager.getInstance().initTunnelFromConf();
|
||||
}
|
||||
|
||||
public String getTunnelHost() {
|
||||
|
@ -786,6 +787,7 @@ public class LinphonePreferences {
|
|||
|
||||
public void setTunnelHost(String host) {
|
||||
getConfig().setString("tunnel", "host", host);
|
||||
LinphoneManager.getInstance().initTunnelFromConf();
|
||||
}
|
||||
|
||||
public int getTunnelPort() {
|
||||
|
@ -794,6 +796,7 @@ public class LinphonePreferences {
|
|||
|
||||
public void setTunnelPort(int port) {
|
||||
getConfig().setInt("tunnel", "port", port);
|
||||
LinphoneManager.getInstance().initTunnelFromConf();
|
||||
}
|
||||
// End of tunnel settings
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue