- Do not re-register when link properties change, but IP addresses remain

the same.
This commit is contained in:
Juha Heinanen
2020-02-18 06:33:16 +02:00
parent 7eca0a4b1b
commit 4faab6d6ab
2 changed files with 6 additions and 3 deletions
@@ -55,11 +55,14 @@ class UserAgent (val uap: String) {
return null return null
} }
fun register() { fun register(reRegister: Boolean) {
for (ua in BaresipService.uas) { for (ua in BaresipService.uas) {
if (ua.account.regint > 0) if (ua.account.regint > 0) {
if ((reRegister == false) && Api.ua_isregistered(ua.uap))
continue
if (Api.ua_register(ua.uap) != 0) if (Api.ua_register(ua.uap) != 0)
Log.d("Baresip", "Failed to register ${ua.account.aor}") Log.d("Baresip", "Failed to register ${ua.account.aor}")
}
} }
} }
} }
@@ -284,7 +284,7 @@ object Utils {
Api.uag_reset_transp(true, true) Api.uag_reset_transp(true, true)
Api.net_debug() Api.net_debug()
} else { } else {
UserAgent.register() UserAgent.register(false)
} }
} }