aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/eu/siacs/conversations/xmpp/jingle/JingleConnection.java11
-rw-r--r--src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java3
-rw-r--r--src/eu/siacs/conversations/xmpp/jingle/stanzas/JinglePacket.java8
3 files changed, 10 insertions, 12 deletions
diff --git a/src/eu/siacs/conversations/xmpp/jingle/JingleConnection.java b/src/eu/siacs/conversations/xmpp/jingle/JingleConnection.java
index 1f6b629c..ad2d94f8 100644
--- a/src/eu/siacs/conversations/xmpp/jingle/JingleConnection.java
+++ b/src/eu/siacs/conversations/xmpp/jingle/JingleConnection.java
@@ -426,9 +426,6 @@ public class JingleConnection {
public void established() {
Log.d("xmppService", "established connection with "+candidate.getHost()+":"+candidate.getPort());
sendCandidateUsed(candidate.getCid());
- if ((receivedCandidate)&&(status == STATUS_ACCEPTED)) {
- connect();
- }
}
});
}
@@ -450,9 +447,11 @@ public class JingleConnection {
content.setAttribute("name", "a-file-offer");
content.setUsedCandidate(this.transportId, cid);
packet.setContent(content);
- Log.d("xmppService","send using candidate: "+cid);
this.sendJinglePacket(packet);
this.sentCandidate = true;
+ if ((receivedCandidate)&&(status == STATUS_ACCEPTED)) {
+ connect();
+ }
}
private void sendCandidateError() {
@@ -463,9 +462,11 @@ public class JingleConnection {
content.setAttribute("name", "a-file-offer");
content.setCandidateError(this.transportId);
packet.setContent(content);
- Log.d("xmppService","send candidate error");
this.sendJinglePacket(packet);
this.sentCandidate = true;
+ if ((receivedCandidate)&&(status == STATUS_ACCEPTED)) {
+ connect();
+ }
}
public String getInitiator() {
diff --git a/src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java b/src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java
index 4618a1be..b5b92554 100644
--- a/src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java
+++ b/src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java
@@ -86,8 +86,6 @@ public class JingleConnectionManager {
.findChild("streamhost",
"http://jabber.org/protocol/bytestreams");
if (streamhost != null) {
- Log.d("xmppService", "streamhost found "
- + streamhost.toString());
JingleCandidate candidate = new JingleCandidate(nextRandomId(),true);
candidate.setHost(streamhost.getAttribute("host"));
candidate.setPort(Integer.parseInt(streamhost.getAttribute("port")));
@@ -109,7 +107,6 @@ public class JingleConnectionManager {
}
} else {
- Log.d("xmppService","found primary candidate in archive");
listener.onPrimaryCandidateFound(true,
this.primaryCandidates.get(account.getJid()));
}
diff --git a/src/eu/siacs/conversations/xmpp/jingle/stanzas/JinglePacket.java b/src/eu/siacs/conversations/xmpp/jingle/stanzas/JinglePacket.java
index e48eadd9..fdb53b36 100644
--- a/src/eu/siacs/conversations/xmpp/jingle/stanzas/JinglePacket.java
+++ b/src/eu/siacs/conversations/xmpp/jingle/stanzas/JinglePacket.java
@@ -95,15 +95,15 @@ public class JinglePacket extends IqPacket {
public String toPrettyString() {
StringBuilder output = new StringBuilder();
- output.append("["+getAction()+ " to:"+getTo()+" ");
+ output.append("["+getAction()+ " to:"+getTo());
if (this.content!=null) {
if (this.content.getUsedCandidate()!=null) {
- output.append("used-candidate="+this.content.getUsedCandidate());
+ output.append(" [used-candidate="+this.content.getUsedCandidate()+"]");
} else if (this.content.hasCandidateError()) {
- output.append("candidate-error");
+ output.append(" [candidate-error]");
} else {
for(Element c : this.content.getCanditates()) {
- output.append("["+c.getAttribute("host")+":"+c.getAttribute("port")+"]");
+ output.append(" ["+c.getAttribute("host")+":"+c.getAttribute("port")+"]");
}
}
}