forked from mirror/monocles_chat
fixed destination calculation for direct socks candidates. fixes #3715
(cherry picked from commit 90526efbd4
)
This commit is contained in:
parent
e6172547c8
commit
c686dcac75
1 changed files with 15 additions and 5 deletions
|
@ -56,12 +56,22 @@ public class JingleSocks5Transport extends JingleTransport {
|
|||
} else {
|
||||
destBuilder.append(this.connection.getTransportId());
|
||||
}
|
||||
if (candidate.isOurs()) {
|
||||
destBuilder.append(this.account.getJid());
|
||||
destBuilder.append(this.connection.getId().with);
|
||||
if (candidate.getType() == JingleCandidate.TYPE_PROXY) {
|
||||
if (candidate.isOurs()) {
|
||||
destBuilder.append(this.account.getJid());
|
||||
destBuilder.append(this.connection.getId().with);
|
||||
} else {
|
||||
destBuilder.append(this.connection.getId().with);
|
||||
destBuilder.append(this.account.getJid());
|
||||
}
|
||||
} else {
|
||||
destBuilder.append(this.connection.getId().with);
|
||||
destBuilder.append(this.account.getJid());
|
||||
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()));
|
||||
|
|
Loading…
Add table
Reference in a new issue