Call updateNetwork also when hotspot is enabled/disabled

No need to get hotspot addresses in updateNetwork
This commit is contained in:
Juha Heinanen
2023-04-19 16:23:44 +03:00
parent 6413127d15
commit 53c293d463

View File

@ -207,7 +207,7 @@ class BaresipService: Service() {
reset = true
if (reset)
Timer().schedule(2000) {
Api.uag_reset_transp(register = true, reinvite = false)
updateNetwork()
}
} else {
Log.w(TAG, "Could not get hotspot addresses")
@ -225,7 +225,7 @@ class BaresipService: Service() {
if (Api.net_rm_address(k) != 0)
Log.e(TAG, "Failed to remove address $k")
hotSpotAddresses = mapOf()
Api.uag_reset_transp(register = true, reinvite = false)
updateNetwork()
}
}
}
@ -1383,8 +1383,6 @@ class BaresipService: Service() {
}
}
if (hotSpotIsEnabled) {
hotSpotAddresses = Utils.hotSpotAddresses()
Log.d(TAG, "HotSpot addresses $hotSpotAddresses")
for ((k, v) in hotSpotAddresses)
if (afMatch(k))
addresses[k] = v