summaryrefslogtreecommitdiff
path: root/src/ua.c
diff options
context:
space:
mode:
authorAlfred E. Heggestad <alfred.heggestad@gmail.com>2016-12-09 16:13:59 +0100
committerAlfred E. Heggestad <alfred.heggestad@gmail.com>2016-12-09 16:13:59 +0100
commit3aa871a496a36bc2a2b76fc2b326d7e19e493077 (patch)
tree1512b1cc47b86c7233ce05603d243e77681b5727 /src/ua.c
parent1491adac706487e36c2447dd967df42de6fe55c1 (diff)
ua: simplify ua_call()
Diffstat (limited to 'src/ua.c')
-rw-r--r--src/ua.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/ua.c b/src/ua.c
index 2b99255..c260c9d 100644
--- a/src/ua.c
+++ b/src/ua.c
@@ -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));
}