From 9e227099c600df07e867cddcdb2d984e9fa8cc17 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Tue, 30 Aug 2022 11:16:35 -0400 Subject: [PATCH] TT#189201 add convenience function call_get_call_subscription Change-Id: Ib5300d4c303e3b430209edf724bdb933ced08b15 --- daemon/call.c | 9 +++++++++ include/call.h | 1 + 2 files changed, 10 insertions(+) diff --git a/daemon/call.c b/daemon/call.c index 88e86ccb9..405754518 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -3046,6 +3046,15 @@ static void __subscribe_offer_answer_both_ways(struct call_monologue *a, struct +struct call_subscription *call_get_call_subscription(GHashTable *ht, struct call_monologue *ml) { + GList *l = g_hash_table_lookup(ht, ml); + if (!l) + return NULL; + return l->data; +} + + + /* called with call->master_lock held in W */ int monologue_publish(struct call_monologue *ml, GQueue *streams, struct sdp_ng_flags *flags) { __call_monologue_init_from_flags(ml, flags); diff --git a/include/call.h b/include/call.h index ef0964e4a..e50f28cee 100644 --- a/include/call.h +++ b/include/call.h @@ -648,6 +648,7 @@ void __monologue_viabranch(struct call_monologue *ml, const str *viabranch); struct packet_stream *__packet_stream_new(struct call *call); void __add_subscription(struct call_monologue *ml, struct call_monologue *other, bool offer_answer, unsigned int media_offset, bool rtcp_only, bool egress); +struct call_subscription *call_get_call_subscription(GHashTable *ht, struct call_monologue *ml); void free_sink_handler(void *); void __add_sink_handler(GQueue *, struct packet_stream *, const struct sink_attrs *);