From b8df345388be02a94f050eebeef711fb4b07af40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= Date: Mon, 4 Jul 2022 06:41:07 +0200 Subject: [PATCH] Print peer ID in unidentifiable log messages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some log messages did not provide any way to identify which peer they refer to, so the peer ID is now printed in them. Signed-off-by: Daniel Calviño Sánchez --- src/utils/webrtc/webrtc.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/utils/webrtc/webrtc.js b/src/utils/webrtc/webrtc.js index 8998743f085..2b6ae2dbad8 100644 --- a/src/utils/webrtc/webrtc.js +++ b/src/utils/webrtc/webrtc.js @@ -186,7 +186,7 @@ function checkStartPublishOwnPeer(signaling) { } if (currentSessionId !== signaling.getSessionId()) { - console.debug('No answer received for own peer but current session id changed, not sending offer again') + console.debug('No answer received for own peer but current session id changed, not sending offer again', currentSessionId, signaling.getSessionId()) clearInterval(delayedConnectionToPeer[currentSessionId]) delete delayedConnectionToPeer[currentSessionId] @@ -194,7 +194,7 @@ function checkStartPublishOwnPeer(signaling) { return } - console.debug('No answer received for own peer, sending offer again') + console.debug('No answer received for own peer, sending offer again', currentSessionId) createPeer() }, 10000) } @@ -372,7 +372,7 @@ function usersChanged(signaling, newUsers, disconnectedSessionIds) { clearInterval(delayedConnectionToPeer[user.sessionId]) delayedConnectionToPeer[user.sessionId] = setInterval(function() { - console.debug('No offer received for new peer, request offer again') + console.debug('No offer received for new peer, request offer again', sessionId) signaling.requestOffer(user, 'video') }, 10000) @@ -380,7 +380,7 @@ function usersChanged(signaling, newUsers, disconnectedSessionIds) { // To avoid overloading the user joining a room (who previously called // all the other participants), we decide who calls who by comparing // the session ids of the users: "larger" ids call "smaller" ones. - console.debug('Starting call with', user) + console.debug('Starting call with', user, sessionId) createPeer() } else if (!useMcu && userHasStreams(selfInCall) && userHasStreams(user) && sessionId > currentSessionId) { // If the remote peer is not aware that it was disconnected @@ -398,11 +398,11 @@ function usersChanged(signaling, newUsers, disconnectedSessionIds) { peer.end() }) - console.debug('No offer nor answer received, sending offer again') + console.debug('No offer nor answer received, sending offer again', sessionId) createPeer() }, 10000) } else { - console.debug('User has no streams, not sending another offer') + console.debug('User has no streams, not sending another offer', sessionId) } } @@ -1575,10 +1575,10 @@ export default function initWebRtc(signaling, _callParticipantCollection, _local } else if (data.type === 'speaking' || data.type === 'stoppedSpeaking') { // Valid known messages, but handled elsewhere } else { - console.debug('Unknown message type %s from %s datachannel', data.type, label, data) + console.debug('Unknown message type %s from %s datachannel', data.type, label, data, peer.id, peer) } } else { - console.debug('Unknown message from %s datachannel', label, data) + console.debug('Unknown message from %s datachannel', label, data, peer.id, peer) } })