mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 19:29:06 +01:00
Reduce DB queries for looking up transport properties.
This commit is contained in:
@@ -249,8 +249,7 @@ class BluetoothPlugin implements DuplexPlugin {
|
||||
@Override
|
||||
public DuplexTransportConnection createConnection(ContactId c) {
|
||||
if (!running) return null;
|
||||
TransportProperties p = callback.getRemoteProperties().get(c);
|
||||
if (p == null) return null;
|
||||
TransportProperties p = callback.getRemoteProperties(c);
|
||||
String address = p.get(PROP_ADDRESS);
|
||||
if (StringUtils.isNullOrEmpty(address)) return null;
|
||||
String uuid = p.get(PROP_UUID);
|
||||
|
||||
@@ -145,8 +145,7 @@ class ModemPlugin implements DuplexPlugin, Modem.Callback {
|
||||
String fromIso = callback.getLocalProperties().get("iso3166");
|
||||
if (StringUtils.isNullOrEmpty(fromIso)) return null;
|
||||
// Get the ISO 3166 code for the callee's country
|
||||
TransportProperties properties = callback.getRemoteProperties().get(c);
|
||||
if (properties == null) return null;
|
||||
TransportProperties properties = callback.getRemoteProperties(c);
|
||||
String toIso = properties.get("iso3166");
|
||||
if (StringUtils.isNullOrEmpty(toIso)) return null;
|
||||
// Get the callee's phone number
|
||||
|
||||
Reference in New Issue
Block a user