Simplified handling of registering failed event

This commit is contained in:
Juha Heinanen
2021-09-20 08:44:07 +03:00
parent 9990ddca06
commit 8ea96963ee
2 changed files with 0 additions and 6 deletions

View File

@ -428,7 +428,6 @@ class BaresipService: Service() {
status[account_index] = R.drawable.dot_white
else
status[account_index] = R.drawable.dot_green
ua.registrationFailed = false
updateStatusNotification()
if (!Utils.isVisible())
return
@ -439,10 +438,6 @@ class BaresipService: Service() {
if (ev.size > 1 && ev[1] == "Invalid argument")
// Likely due to DNS lookup failure
newEvent = "registering failed,DNS lookup failed"
if (!ua.registrationFailed) {
ua.registrationFailed = true
updateNetwork()
}
if (!Utils.isVisible())
return
}

View File

@ -3,7 +3,6 @@ package com.tutpro.baresip
class UserAgent(val uap: String) {
val account = Account(Api.ua_account(uap))
var registrationFailed = false
fun add(status: Int) {
BaresipService.uas.add(this)