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
|
status[account_index] = R.drawable.dot_white
|
||||||
else
|
else
|
||||||
status[account_index] = R.drawable.dot_green
|
status[account_index] = R.drawable.dot_green
|
||||||
ua.registrationFailed = false
|
|
||||||
updateStatusNotification()
|
updateStatusNotification()
|
||||||
if (!Utils.isVisible())
|
if (!Utils.isVisible())
|
||||||
return
|
return
|
||||||
@@ -439,10 +438,6 @@ class BaresipService: Service() {
|
|||||||
if (ev.size > 1 && ev[1] == "Invalid argument")
|
if (ev.size > 1 && ev[1] == "Invalid argument")
|
||||||
// Likely due to DNS lookup failure
|
// Likely due to DNS lookup failure
|
||||||
newEvent = "registering failed,DNS lookup failed"
|
newEvent = "registering failed,DNS lookup failed"
|
||||||
if (!ua.registrationFailed) {
|
|
||||||
ua.registrationFailed = true
|
|
||||||
updateNetwork()
|
|
||||||
}
|
|
||||||
if (!Utils.isVisible())
|
if (!Utils.isVisible())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package com.tutpro.baresip
|
|||||||
class UserAgent(val uap: String) {
|
class UserAgent(val uap: String) {
|
||||||
|
|
||||||
val account = Account(Api.ua_account(uap))
|
val account = Account(Api.ua_account(uap))
|
||||||
var registrationFailed = false
|
|
||||||
|
|
||||||
fun add(status: Int) {
|
fun add(status: Int) {
|
||||||
BaresipService.uas.add(this)
|
BaresipService.uas.add(this)
|
||||||
|
|||||||
Reference in New Issue
Block a user