diff options
author | Alfred E. Heggestad <aeh@db.org> | 2015-08-01 14:26:48 +0200 |
---|---|---|
committer | Alfred E. Heggestad <aeh@db.org> | 2015-08-01 14:26:48 +0200 |
commit | 190e43d590184138a728e163b8f54412908bc5e2 (patch) | |
tree | 512137aa1458a666f0eb2681381382c2f73586d1 | |
parent | 85ff1cc0e13e540fcc8e306253c321277df664f0 (diff) |
ua: added prototype for ua_prev_call()
-rw-r--r-- | include/baresip.h | 1 | ||||
-rw-r--r-- | src/ua.c | 7 |
2 files changed, 5 insertions, 3 deletions
diff --git a/include/baresip.h b/include/baresip.h index cfd3972..9ade882 100644 --- a/include/baresip.h +++ b/include/baresip.h @@ -509,6 +509,7 @@ const char *ua_local_cuser(const struct ua *ua); struct account *ua_account(const struct ua *ua); const char *ua_outbound(const struct ua *ua); struct call *ua_call(const struct ua *ua); +struct call *ua_prev_call(const struct ua *ua); struct account *ua_prm(const struct ua *ua); struct list *ua_calls(const struct ua *ua); enum presence_status ua_presence_status(const struct ua *ua); @@ -922,20 +922,21 @@ struct call *ua_call(const struct ua *ua) return NULL; } + struct call *ua_prev_call(const struct ua *ua) { struct le *le; + int prev = 0; if (!ua) return NULL; - int prev = 0; for (le = ua->calls.tail; le; le = le->prev) { - if( prev == 1){ + if ( prev == 1) { struct call *call = le->data; return call; } - if( prev == 0) + if ( prev == 0) prev = 1; } |