summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorxanm <xanm@mail.ru>2015-07-20 17:00:45 +0300
committerxanm <xanm@mail.ru>2015-07-20 17:00:45 +0300
commit85ff1cc0e13e540fcc8e306253c321277df664f0 (patch)
tree0c59640b10313e71a9023806ab89bd0275614eff /src
parent52d1c338fa429ca4a37c0737190d1e6099af37a9 (diff)
--add hold for previous call command(too hold active call when we have incoming call)
Diffstat (limited to 'src')
-rw-r--r--src/ua.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/ua.c b/src/ua.c
index 5bdb991..2f86d33 100644
--- a/src/ua.c
+++ b/src/ua.c
@@ -922,6 +922,26 @@ struct call *ua_call(const struct ua *ua)
return NULL;
}
+struct call *ua_prev_call(const struct ua *ua)
+{
+ struct le *le;
+
+ if (!ua)
+ return NULL;
+
+ int prev = 0;
+ for (le = ua->calls.tail; le; le = le->prev) {
+ if( prev == 1){
+ struct call *call = le->data;
+ return call;
+ }
+ if( prev == 0)
+ prev = 1;
+ }
+
+ return NULL;
+}
+
int ua_debug(struct re_printf *pf, const struct ua *ua)
{