mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-17 13:19:52 +01:00
Fix activating transport keys in JdbcDatabase
This commit is contained in:
@@ -2898,6 +2898,8 @@ abstract class JdbcDatabase implements Database<Connection> {
|
|||||||
String sql = "UPDATE outgoingKeys SET active = true"
|
String sql = "UPDATE outgoingKeys SET active = true"
|
||||||
+ " WHERE transportId = ? AND keySetId = ?";
|
+ " WHERE transportId = ? AND keySetId = ?";
|
||||||
ps = txn.prepareStatement(sql);
|
ps = txn.prepareStatement(sql);
|
||||||
|
ps.setString(1, t.getString());
|
||||||
|
ps.setInt(2, k.getInt());
|
||||||
int affected = ps.executeUpdate();
|
int affected = ps.executeUpdate();
|
||||||
if (affected < 0 || affected > 1) throw new DbStateException();
|
if (affected < 0 || affected > 1) throw new DbStateException();
|
||||||
ps.close();
|
ps.close();
|
||||||
|
|||||||
Reference in New Issue
Block a user