aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/xmpp/jingle/stanzas
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-04-19 01:14:30 +0200
committerDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-04-19 01:14:30 +0200
commit5c0873c7cab8bdb95754f4a67839aa6ed5a3d2e8 (patch)
tree8783b29c032b4c0410943d411be404f036d9988e /src/eu/siacs/conversations/xmpp/jingle/stanzas
parent7ccbf0008a600cd00e3dea1b95890d7454509af3 (diff)
cleaned up debug log a little bit
Diffstat (limited to 'src/eu/siacs/conversations/xmpp/jingle/stanzas')
-rw-r--r--src/eu/siacs/conversations/xmpp/jingle/stanzas/JinglePacket.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/eu/siacs/conversations/xmpp/jingle/stanzas/JinglePacket.java b/src/eu/siacs/conversations/xmpp/jingle/stanzas/JinglePacket.java
index 55700609..e48eadd9 100644
--- a/src/eu/siacs/conversations/xmpp/jingle/stanzas/JinglePacket.java
+++ b/src/eu/siacs/conversations/xmpp/jingle/stanzas/JinglePacket.java
@@ -92,4 +92,22 @@ public class JinglePacket extends IqPacket {
public boolean isAction(String action) {
return action.equalsIgnoreCase(this.getAction());
}
+
+ public String toPrettyString() {
+ StringBuilder output = new StringBuilder();
+ output.append("["+getAction()+ " to:"+getTo()+" ");
+ if (this.content!=null) {
+ if (this.content.getUsedCandidate()!=null) {
+ output.append("used-candidate="+this.content.getUsedCandidate());
+ } else if (this.content.hasCandidateError()) {
+ output.append("candidate-error");
+ } else {
+ for(Element c : this.content.getCanditates()) {
+ output.append("["+c.getAttribute("host")+":"+c.getAttribute("port")+"]");
+ }
+ }
+ }
+ output.append("]");
+ return output.toString();
+ }
}