From 90d9cdbdb0802f722c973fe9b52de1e08be63eb2 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Fri, 20 Jan 2023 15:31:55 -0500 Subject: [PATCH] MT#56447 don't tie rooms to specific WS sessions Our own Janus WS client would create a single WS session and then create all rooms under this one session and run all publishes and subscribers under the same session. This is not a restiction imposed by Janus though, which allows participation in one room by multiple sessions. Remove this restriction to more closely mirror Janus behaviour. Change-Id: Ic11f961369ce5ded599a7a22cd730236460a8c61 --- daemon/janus.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/daemon/janus.c b/daemon/janus.c index 88f659f03..1e80da33d 100644 --- a/daemon/janus.c +++ b/daemon/janus.c @@ -396,8 +396,6 @@ static const char *janus_videoroom_join(struct websocket_message *wm, struct jan struct janus_room *room = NULL; if (room_id) room = g_hash_table_lookup(janus_rooms, &room_id); - if (room && room->session != session) - room = NULL; *retcode = 426; if (!room) return "No such room"; @@ -693,8 +691,6 @@ static const char *janus_videoroom_configure(struct websocket_message *wm, struc LOCK(&janus_lock); struct janus_room *room = g_hash_table_lookup(janus_rooms, &room_id); - if (room && room->session != session) - room = NULL; *retcode = 426; if (!room) return "No such room"; @@ -815,8 +811,6 @@ static const char *janus_videoroom_start(struct websocket_message *wm, struct ja LOCK(&janus_lock); struct janus_room *room = g_hash_table_lookup(janus_rooms, &room_id); - if (room && room->session != session) - room = NULL; *retcode = 426; if (!room) return "No such room"; @@ -1402,7 +1396,7 @@ const char *janus_trickle(JsonReader *reader, struct janus_session *session, uin struct janus_room *room = g_hash_table_lookup(janus_rooms, &room_id); *retcode = 426; - if (!room || room->session != session) + if (!room) return "No such room"; call = call_get(&room->call_id); if (!call)