Fix activating transport keys in JdbcDatabase

This commit is contained in:
Torsten Grote
2018-04-24 10:03:27 -03:00
parent f78f065204
commit 218b2f7ff9

View File

@@ -2898,6 +2898,8 @@ abstract class JdbcDatabase implements Database<Connection> {
String sql = "UPDATE outgoingKeys SET active = true"
+ " WHERE transportId = ? AND keySetId = ?";
ps = txn.prepareStatement(sql);
ps.setString(1, t.getString());
ps.setInt(2, k.getInt());
int affected = ps.executeUpdate();
if (affected < 0 || affected > 1) throw new DbStateException();
ps.close();