mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-19 22:29:53 +01:00
Fixed a test.
This commit is contained in:
@@ -1204,6 +1204,7 @@ DatabaseCleaner.Callback {
|
|||||||
|
|
||||||
public void receiveTransportUpdate(ContactId c, TransportUpdate t)
|
public void receiveTransportUpdate(ContactId c, TransportUpdate t)
|
||||||
throws DbException {
|
throws DbException {
|
||||||
|
Collection<Transport> transports;
|
||||||
// Update the contact's transport properties
|
// Update the contact's transport properties
|
||||||
contactLock.readLock().lock();
|
contactLock.readLock().lock();
|
||||||
try {
|
try {
|
||||||
@@ -1212,7 +1213,7 @@ DatabaseCleaner.Callback {
|
|||||||
try {
|
try {
|
||||||
T txn = db.startTransaction();
|
T txn = db.startTransaction();
|
||||||
try {
|
try {
|
||||||
Collection<Transport> transports = t.getTransports();
|
transports = t.getTransports();
|
||||||
db.setTransports(txn, c, transports, t.getTimestamp());
|
db.setTransports(txn, c, transports, t.getTimestamp());
|
||||||
db.commitTransaction(txn);
|
db.commitTransaction(txn);
|
||||||
} catch(DbException e) {
|
} catch(DbException e) {
|
||||||
@@ -1226,7 +1227,7 @@ DatabaseCleaner.Callback {
|
|||||||
contactLock.readLock().unlock();
|
contactLock.readLock().unlock();
|
||||||
}
|
}
|
||||||
// Call the listeners outside the lock
|
// Call the listeners outside the lock
|
||||||
callListeners(new RemoteTransportsUpdatedEvent(c, t.getTransports()));
|
callListeners(new RemoteTransportsUpdatedEvent(c, transports));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeContact(ContactId c) throws DbException {
|
public void removeContact(ContactId c) throws DbException {
|
||||||
|
|||||||
Reference in New Issue
Block a user