fixed destination calculation for direct socks candidates. fixes #3715
This commit is contained in:
parent
11de70312c
commit
90526efbd4
|
@ -58,6 +58,7 @@ public class JingleSocks5Transport extends JingleTransport {
|
|||
} else {
|
||||
destBuilder.append(this.connection.getTransportId());
|
||||
}
|
||||
if (candidate.getType() == JingleCandidate.TYPE_PROXY) {
|
||||
if (candidate.isOurs()) {
|
||||
destBuilder.append(this.account.getJid());
|
||||
destBuilder.append(this.connection.getId().with);
|
||||
|
@ -65,6 +66,15 @@ public class JingleSocks5Transport extends JingleTransport {
|
|||
destBuilder.append(this.connection.getId().with);
|
||||
destBuilder.append(this.account.getJid());
|
||||
}
|
||||
} else {
|
||||
if (connection.isInitiator()) {
|
||||
destBuilder.append(this.account.getJid());
|
||||
destBuilder.append(this.connection.getId().with);
|
||||
} else {
|
||||
destBuilder.append(this.connection.getId().with);
|
||||
destBuilder.append(this.account.getJid());
|
||||
}
|
||||
}
|
||||
messageDigest.reset();
|
||||
this.destination = CryptoHelper.bytesToHex(messageDigest.digest(destBuilder.toString().getBytes()));
|
||||
if (candidate.isOurs() && candidate.getType() == JingleCandidate.TYPE_DIRECT) {
|
||||
|
|
Loading…
Reference in New Issue