currentCall returns call that was added last

This commit is contained in:
Juha Heinanen
2026-01-13 04:01:54 +02:00
parent 019d36e0d7
commit 1081b63a85

View File

@ -40,8 +40,9 @@ class UserAgent(val uap: Long) {
return result return result
} }
// Returns call of UA that was added last or NULL
fun currentCall(): Call? { fun currentCall(): Call? {
for (c in BaresipService.calls) for (c in BaresipService.calls.reversed())
if (c.ua == this) if (c.ua == this)
return c return c
return null return null