Call updateNetwork also when hotspot is enabled/disabled
No need to get hotspot addresses in updateNetwork
This commit is contained in:
@@ -207,7 +207,7 @@ class BaresipService: Service() {
|
|||||||
reset = true
|
reset = true
|
||||||
if (reset)
|
if (reset)
|
||||||
Timer().schedule(2000) {
|
Timer().schedule(2000) {
|
||||||
Api.uag_reset_transp(register = true, reinvite = false)
|
updateNetwork()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Log.w(TAG, "Could not get hotspot addresses")
|
Log.w(TAG, "Could not get hotspot addresses")
|
||||||
@@ -225,7 +225,7 @@ class BaresipService: Service() {
|
|||||||
if (Api.net_rm_address(k) != 0)
|
if (Api.net_rm_address(k) != 0)
|
||||||
Log.e(TAG, "Failed to remove address $k")
|
Log.e(TAG, "Failed to remove address $k")
|
||||||
hotSpotAddresses = mapOf()
|
hotSpotAddresses = mapOf()
|
||||||
Api.uag_reset_transp(register = true, reinvite = false)
|
updateNetwork()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1383,8 +1383,6 @@ class BaresipService: Service() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (hotSpotIsEnabled) {
|
if (hotSpotIsEnabled) {
|
||||||
hotSpotAddresses = Utils.hotSpotAddresses()
|
|
||||||
Log.d(TAG, "HotSpot addresses $hotSpotAddresses")
|
|
||||||
for ((k, v) in hotSpotAddresses)
|
for ((k, v) in hotSpotAddresses)
|
||||||
if (afMatch(k))
|
if (afMatch(k))
|
||||||
addresses[k] = v
|
addresses[k] = v
|
||||||
|
|||||||
Reference in New Issue
Block a user