Make relay arguments consistent.

This commit is contained in:
Moxie Marlinspike 2013-10-19 10:53:50 -07:00
parent fa073e0b46
commit 5b2caa0074
2 changed files with 2 additions and 2 deletions

View File

@ -139,7 +139,7 @@ public class PushServiceSocket {
makeRequest(String.format(PREKEY_PATH, ""), "PUT", PreKeyList.toJson(new PreKeyList(lastResortEntity, entities))); makeRequest(String.format(PREKEY_PATH, ""), "PUT", PreKeyList.toJson(new PreKeyList(lastResortEntity, entities)));
} }
public PreKeyEntity getPreKey(String number, String relay) throws IOException { public PreKeyEntity getPreKey(String relay, String number) throws IOException {
String path = String.format(PREKEY_PATH, number); String path = String.format(PREKEY_PATH, number);
if (relay != null) { if (relay != null) {

View File

@ -191,7 +191,7 @@ public class PushTransport extends BaseTransport {
IdentityKeyPair identityKeyPair = IdentityKeyUtil.getIdentityKeyPair(context, masterSecret); IdentityKeyPair identityKeyPair = IdentityKeyUtil.getIdentityKeyPair(context, masterSecret);
IdentityKey identityKey = identityKeyPair.getPublicKey(); IdentityKey identityKey = identityKeyPair.getPublicKey();
String relay = Directory.getInstance(context).getRelay(canonicalRecipientNumber); String relay = Directory.getInstance(context).getRelay(canonicalRecipientNumber);
PreKeyEntity preKey = socket.getPreKey(canonicalRecipientNumber, relay); PreKeyEntity preKey = socket.getPreKey(relay, canonicalRecipientNumber);
KeyExchangeProcessor processor = new KeyExchangeProcessor(context, masterSecret, recipient); KeyExchangeProcessor processor = new KeyExchangeProcessor(context, masterSecret, recipient);
processor.processKeyExchangeMessage(preKey); processor.processKeyExchangeMessage(preKey);