fixed destination calculation for direct socks candidates. fixes #3715
This commit is contained in:
parent
11de70312c
commit
90526efbd4
|
@ -58,12 +58,22 @@ public class JingleSocks5Transport extends JingleTransport {
|
||||||
} else {
|
} else {
|
||||||
destBuilder.append(this.connection.getTransportId());
|
destBuilder.append(this.connection.getTransportId());
|
||||||
}
|
}
|
||||||
if (candidate.isOurs()) {
|
if (candidate.getType() == JingleCandidate.TYPE_PROXY) {
|
||||||
destBuilder.append(this.account.getJid());
|
if (candidate.isOurs()) {
|
||||||
destBuilder.append(this.connection.getId().with);
|
destBuilder.append(this.account.getJid());
|
||||||
|
destBuilder.append(this.connection.getId().with);
|
||||||
|
} else {
|
||||||
|
destBuilder.append(this.connection.getId().with);
|
||||||
|
destBuilder.append(this.account.getJid());
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
destBuilder.append(this.connection.getId().with);
|
if (connection.isInitiator()) {
|
||||||
destBuilder.append(this.account.getJid());
|
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();
|
messageDigest.reset();
|
||||||
this.destination = CryptoHelper.bytesToHex(messageDigest.digest(destBuilder.toString().getBytes()));
|
this.destination = CryptoHelper.bytesToHex(messageDigest.digest(destBuilder.toString().getBytes()));
|
||||||
|
|
Loading…
Reference in a new issue