diff options
author | xanm <xanm@mail.ru> | 2015-07-20 17:00:45 +0300 |
---|---|---|
committer | xanm <xanm@mail.ru> | 2015-07-20 17:00:45 +0300 |
commit | 85ff1cc0e13e540fcc8e306253c321277df664f0 (patch) | |
tree | 0c59640b10313e71a9023806ab89bd0275614eff /src/ua.c | |
parent | 52d1c338fa429ca4a37c0737190d1e6099af37a9 (diff) |
--add hold for previous call command(too hold active call when we have incoming call)
Diffstat (limited to 'src/ua.c')
-rw-r--r-- | src/ua.c | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -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) { |