From 889941416a509cdec265f1bf06e024c5fe89616c Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Tue, 4 Apr 2023 10:22:33 -0400 Subject: [PATCH] MT#56447 don't pointlessly create monologue There's no point in creating a new monologue that doesn't exist yet if all we want to do is destroy it. Change-Id: I6b782f2706f82d1f15a5718f1bf7352fc3c3f0a4 --- daemon/janus.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/daemon/janus.c b/daemon/janus.c index a03ddf86a..42e7de316 100644 --- a/daemon/janus.c +++ b/daemon/janus.c @@ -1367,8 +1367,7 @@ const char *janus_detach(struct websocket_message *wm, JsonReader *reader, JsonB struct call *call = call_get(&room->call_id); if (call) { // remove publisher monologue - struct call_monologue *ml = janus_get_monologue(handle_id, call, - call_get_or_create_monologue); + struct call_monologue *ml = janus_get_monologue(handle_id, call, call_get_monologue); if (ml) monologue_destroy(ml); @@ -1385,8 +1384,7 @@ const char *janus_detach(struct websocket_message *wm, JsonReader *reader, JsonB struct call *call = call_get(&room->call_id); if (call) { // remove subscriber monologue - struct call_monologue *ml = janus_get_monologue(handle_id, call, - call_get_or_create_monologue); + struct call_monologue *ml = janus_get_monologue(handle_id, call, call_get_monologue); if (ml) monologue_destroy(ml);