From 78c6e3438be0046d2fb5c38ff7ad172c1cfafa99 Mon Sep 17 00:00:00 2001 From: Thiago Camargo Date: Wed, 7 Feb 2007 04:13:37 +0000 Subject: [PATCH] Only relay session if the Transport is Relayed git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@7031 b35dd754-fafc-0310-a699-88a17e54d16e --- .../jivesoftware/smackx/jingle/nat/ICETransportManager.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jingle/extension/source/org/jivesoftware/smackx/jingle/nat/ICETransportManager.java b/jingle/extension/source/org/jivesoftware/smackx/jingle/nat/ICETransportManager.java index 45331ac40..e4d8dcf71 100644 --- a/jingle/extension/source/org/jivesoftware/smackx/jingle/nat/ICETransportManager.java +++ b/jingle/extension/source/org/jivesoftware/smackx/jingle/nat/ICETransportManager.java @@ -53,7 +53,11 @@ public class ICETransportManager extends JingleTransportManager implements Jingl // Implement a Session Listener to relay candidates after establishment public void sessionEstablished(PayloadType pt, TransportCandidate rc, TransportCandidate lc, JingleSession jingleSession) { - RTPBridge rtpBridge = RTPBridge.relaySession(lc.getConnection(), lc.getSessionId(), lc.getPassword(), rc, lc); + if (lc instanceof TransportCandidate.Ice) { + if (((TransportCandidate.Ice) lc).getType().equals("relay")) { + RTPBridge rtpBridge = RTPBridge.relaySession(lc.getConnection(), lc.getSessionId(), lc.getPassword(), rc, lc); + } + } } public void sessionDeclined(String reason, JingleSession jingleSession) {