You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by se...@apache.org on 2021/02/23 22:22:52 UTC

[openmeetings] branch feature/OPENMEETINGS-2580-onIceCandidate-queueing created (now ea2d896)

This is an automated email from the ASF dual-hosted git repository.

sebawagner pushed a change to branch feature/OPENMEETINGS-2580-onIceCandidate-queueing
in repository https://gitbox.apache.org/repos/asf/openmeetings.git.


      at ea2d896  OPENMEETINGS-2580 Enable additional logs for making failed attempts to add ice candidate visible.

This branch includes the following new commits:

     new ea2d896  OPENMEETINGS-2580 Enable additional logs for making failed attempts to add ice candidate visible.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[openmeetings] 01/01: OPENMEETINGS-2580 Enable additional logs for making failed attempts to add ice candidate visible.

Posted by se...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sebawagner pushed a commit to branch feature/OPENMEETINGS-2580-onIceCandidate-queueing
in repository https://gitbox.apache.org/repos/asf/openmeetings.git

commit ea2d8967af045952fc9d9f3a3a1153bfc647c4f6
Author: Sebastian Wagner <se...@gmail.com>
AuthorDate: Wed Feb 24 11:22:34 2021 +1300

    OPENMEETINGS-2580 Enable additional logs for making failed attempts to add ice candidate visible.
---
 .../main/java/org/apache/openmeetings/core/remote/KStream.java    | 5 ++++-
 .../apache/openmeetings/core/remote/StreamProcessorActions.java   | 8 +++++---
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/KStream.java b/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/KStream.java
index 47d8201..23d6a5a 100644
--- a/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/KStream.java
+++ b/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/KStream.java
@@ -504,9 +504,10 @@ public class KStream extends AbstractStream implements ISipCallbacks {
 		sipProcessor = Optional.empty();
 	}
 
-	public void addCandidate(IceCandidate candidate, String uid) {
+	public void addIceCandidate(IceCandidate candidate, String uid) {
 		if (this.uid.equals(uid)) {
 			if (!(outgoingMedia instanceof WebRtcEndpoint)) {
+				log.warn("addIceCandidate iceCandidate while not ready yet, uid: {}", uid);
 				return;
 			}
 			((WebRtcEndpoint)outgoingMedia).addIceCandidate(candidate);
@@ -515,6 +516,8 @@ public class KStream extends AbstractStream implements ISipCallbacks {
 			log.debug("Add candidate for {}, listener found ? {}", uid, endpoint != null);
 			if (endpoint != null) {
 				endpoint.addIceCandidate(candidate);
+			} else {
+				log.warn("addIceCandidate iceCandidate could not find endpoint, uid: {}", uid);
 			}
 		}
 	}
diff --git a/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/StreamProcessorActions.java b/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/StreamProcessorActions.java
index 6580918..8608485 100644
--- a/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/StreamProcessorActions.java
+++ b/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/StreamProcessorActions.java
@@ -54,17 +54,19 @@ public class StreamProcessorActions {
 	protected void addIceCandidate(JSONObject msg) {
 		final String uid = msg.optString("uid");
 		KStream sender;
+		JSONObject candidate = msg.getJSONObject(PARAM_CANDIDATE);
+		String candStr = candidate.getString(PARAM_CANDIDATE);
 		sender = streamProcessor.getByUid(uid);
 		if (sender != null) {
-			JSONObject candidate = msg.getJSONObject(PARAM_CANDIDATE);
-			String candStr = candidate.getString(PARAM_CANDIDATE);
 			if (!Strings.isEmpty(candStr)) {
 				IceCandidate cand = new IceCandidate(
 						candStr
 						, candidate.getString("sdpMid")
 						, candidate.getInt("sdpMLineIndex"));
-				sender.addCandidate(cand, msg.getString("luid"));
+				sender.addIceCandidate(cand, msg.getString("luid"));
 			}
+		} else {
+			log.warn("addIceCandidate sender is empty, uid: {}, candStr: {} ", uid, candStr);
 		}
 	}