From 13dfc366d1dc8d56071ace1fb7f2394015658658 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Mon, 23 Nov 2020 13:50:16 -0500 Subject: [PATCH] TT#81212 add function to change call state (own/foreign) Change-Id: Ia9010c270839832abbb0d7b7742a4bf8cda1d538 (cherry picked from commit c9140f9f66cfb79e27bf6a9b3ac9a05e852a1fed) --- daemon/call.c | 8 ++++++++ include/call.h | 1 + 2 files changed, 9 insertions(+) diff --git a/daemon/call.c b/daemon/call.c index a21bf3aca..c3417a2c0 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -118,6 +118,14 @@ out: +void call_make_own_foreign(struct call *c, int foreign) { + statistics_update_foreignown_dec(c); + c->foreign_call = foreign ? 1 : 0; + statistics_update_foreignown_inc(c); +} + + + /* called with hashlock held */ static void call_timer_iterator(struct call *c, struct iterator_helper *hlp) { GList *it; diff --git a/include/call.h b/include/call.h index 01cfc0da0..3b67fabb8 100644 --- a/include/call.h +++ b/include/call.h @@ -432,6 +432,7 @@ struct packet_stream *__packet_stream_new(struct call *call); struct call *call_get_or_create(const str *callid, enum call_type); struct call *call_get_opmode(const str *callid, enum call_opmode opmode); +void call_make_own_foreign(struct call *c, int foreign); struct call_monologue *call_get_mono_dialogue(struct call *call, const str *fromtag, const str *totag, const str *viabranch); struct call *call_get(const str *callid);