Simplified handling of registering failed event
This commit is contained in:
@ -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
|
||||
}
|
||||
|
||||
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user