aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2015-05-18 03:17:14 +0200
committerDaniel Gultsch <daniel@gultsch.de>2015-05-18 08:45:50 +0200
commitfbc43a8d38e62fc2a3b60e7c363c8fe1e2668cc6 (patch)
treec91ed81924d2c9f3ce9605986e4edf20ded8e569
parent34545aa96fc3148d7fb038109c99841ee4d16690 (diff)
don't offer initiator his own candidates
-rw-r--r--src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java
index 6c42d3d2c..c9bb9c93b 100644
--- a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java
+++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java
@@ -213,7 +213,7 @@ public class JingleConnection implements Downloadable {
@Override
public void onPrimaryCandidateFound(boolean success,
- final JingleCandidate candidate) {
+ final JingleCandidate candidate) {
if (success) {
final JingleSocks5Transport socksConnection = new JingleSocks5Transport(
JingleConnection.this, candidate);
@@ -399,7 +399,9 @@ public class JingleConnection implements Downloadable {
private List<Element> getCandidatesAsElements() {
List<Element> elements = new ArrayList<>();
for (JingleCandidate c : this.candidates) {
- elements.add(c.toElement());
+ if (c.isOurs()) {
+ elements.add(c.toElement());
+ }
}
return elements;
}