diff options
author | Alfred E. Heggestad <alfred.heggestad@gmail.com> | 2016-12-09 16:13:59 +0100 |
---|---|---|
committer | Alfred E. Heggestad <alfred.heggestad@gmail.com> | 2016-12-09 16:13:59 +0100 |
commit | 3aa871a496a36bc2a2b76fc2b326d7e19e493077 (patch) | |
tree | 1512b1cc47b86c7233ce05603d243e77681b5727 /src/ua.c | |
parent | 1491adac706487e36c2447dd967df42de6fe55c1 (diff) |
ua: simplify ua_call()
Diffstat (limited to 'src/ua.c')
-rw-r--r-- | src/ua.c | 15 |
1 files changed, 2 insertions, 13 deletions
@@ -1016,25 +1016,14 @@ const char *ua_outbound(const struct ua *ua) * Current call strategy: * * We can only have 1 current call. The current call is the one that was - * added last (end of the list), which is not on-hold + * added last (end of the list). */ struct call *ua_call(const struct ua *ua) { - struct le *le; - if (!ua) return NULL; - for (le = ua->calls.tail; le; le = le->prev) { - - struct call *call = le->data; - - /* todo: check if call is on-hold */ - - return call; - } - - return NULL; + return list_ledata(list_tail(&ua->calls)); } |