- Removed Bind Address from Settings (it didn't work as expected).
This commit is contained in:
@@ -274,14 +274,6 @@ class BaresipService: Service() {
|
||||
|
||||
showStatusNotification()
|
||||
|
||||
if (Config.variable("dyn_dns")[0] == "yes")
|
||||
Config.removeVariable("dns_server")
|
||||
|
||||
if (bindAddress != "") {
|
||||
Config.removeVariable("net_interface")
|
||||
Config.save()
|
||||
}
|
||||
|
||||
if (AccountsActivity.noAccounts()) {
|
||||
val newIntent = Intent(this, MainActivity::class.java)
|
||||
newIntent.flags = Intent.FLAG_ACTIVITY_SINGLE_TOP or Intent.FLAG_ACTIVITY_CLEAR_TOP or
|
||||
@@ -1056,7 +1048,6 @@ class BaresipService: Service() {
|
||||
var callVolume = 0
|
||||
var dynDns = false
|
||||
var preferIpV6 = false
|
||||
var bindAddress = ""
|
||||
var filesPath = ""
|
||||
var downloadsPath = ""
|
||||
|
||||
|
||||
@@ -76,7 +76,6 @@ object Config {
|
||||
} else {
|
||||
if (config.contains(Regex("dyn_dns[ ]+yes"))) {
|
||||
removeVariable("dns_server")
|
||||
Log.d("Baresip", "DNS servers ${BaresipService.dnsServers}")
|
||||
for (dnsServer in BaresipService.dnsServers)
|
||||
if (Utils.checkIpV4(dnsServer.hostAddress))
|
||||
config = "${config}dns_server ${dnsServer.hostAddress}:53\n"
|
||||
|
||||
@@ -21,7 +21,6 @@ class ConfigActivity : AppCompatActivity() {
|
||||
|
||||
internal lateinit var autoStart: CheckBox
|
||||
internal lateinit var listenAddr: EditText
|
||||
internal lateinit var bindAddr: EditText
|
||||
internal lateinit var preferIPv6: CheckBox
|
||||
internal lateinit var dnsServers: EditText
|
||||
internal lateinit var certificateFile: CheckBox
|
||||
@@ -35,7 +34,6 @@ class ConfigActivity : AppCompatActivity() {
|
||||
|
||||
private var oldAutoStart = ""
|
||||
private var oldListenAddr = ""
|
||||
private var oldBindAddr = ""
|
||||
private var oldPreferIPv6 = ""
|
||||
private var oldDnsServers = ""
|
||||
private var oldCertificateFile = false
|
||||
@@ -68,11 +66,6 @@ class ConfigActivity : AppCompatActivity() {
|
||||
oldListenAddr = if (laCv.size == 0) "" else laCv[0]
|
||||
listenAddr.setText(oldListenAddr)
|
||||
|
||||
bindAddr = findViewById(R.id.BindAddress) as EditText
|
||||
val baCv = Config.variable("net_interface")
|
||||
oldBindAddr = if (baCv.size == 0) "" else baCv[0]
|
||||
bindAddr.setText(oldBindAddr)
|
||||
|
||||
preferIPv6 = findViewById(R.id.PreferIPv6) as CheckBox
|
||||
val piCv = Config.variable("prefer_ipv6")
|
||||
oldPreferIPv6 = if (piCv.size == 0) "no" else piCv[0]
|
||||
@@ -222,19 +215,6 @@ class ConfigActivity : AppCompatActivity() {
|
||||
restart = true
|
||||
}
|
||||
|
||||
val bindAddr = bindAddr.text.toString().trim()
|
||||
if (bindAddr != oldBindAddr) {
|
||||
if ((bindAddr != "") && !Utils.checkIp(bindAddr) && !Utils.checkIfName(bindAddr)) {
|
||||
Utils.alertView(this, getString(R.string.notice),
|
||||
"${getString(R.string.invalid_bind_address)}: $bindAddr")
|
||||
return false
|
||||
}
|
||||
Config.removeVariable("net_interface")
|
||||
if (bindAddr != "") Config.addLine("net_interface $bindAddr")
|
||||
save = true
|
||||
restart = true
|
||||
}
|
||||
|
||||
var preferIPv6String = "no"
|
||||
if (preferIPv6.isChecked) preferIPv6String = "yes"
|
||||
if (oldPreferIPv6 != preferIPv6String) {
|
||||
@@ -472,10 +452,6 @@ class ConfigActivity : AppCompatActivity() {
|
||||
Utils.alertView(this, getString(R.string.listen_address),
|
||||
getString(R.string.listen_address_help))
|
||||
}
|
||||
findViewById(R.id.BindAddressTitle) as TextView-> {
|
||||
Utils.alertView(this, getString(R.string.bind_address),
|
||||
getString(R.string.bind_address_help))
|
||||
}
|
||||
findViewById(R.id.PreferIPv6Title) as TextView-> {
|
||||
Utils.alertView(this, getString(R.string.prefer_ipv6),
|
||||
getString(R.string.prefer_ipv6_help))
|
||||
|
||||
Reference in New Issue
Block a user