Fixed a test.

This commit is contained in:
akwizgran
2011-11-24 22:17:02 +00:00
parent aefa7798e1
commit c9a43ad4bd

View File

@@ -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 {