Browse Source

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
pull/1642/head
Richard Fuchs 3 years ago
parent
commit
889941416a
1 changed files with 2 additions and 4 deletions
  1. +2
    -4
      daemon/janus.c

+ 2
- 4
daemon/janus.c View File

@ -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);


Loading…
Cancel
Save