From 5a365f6ce98f5089fd7f9bba7fa238dc94b53250 Mon Sep 17 00:00:00 2001 From: akwizgran <michael@briarproject.org> Date: Mon, 15 Apr 2013 11:20:59 +0100 Subject: [PATCH] Storing a new secret can cause more than one old secret to expire. This depends on the (unspecified) order in which new secrets are stored. For example, if the secrets for periods 0 - 2 are loaded in period 3, the secrets for periods 3 and 4 will be stored; the secrets for periods 0 and 1 may expire separately if the secret for period 3 is stored before the secret for period 4, or together if the secret for period 4 is stored before the secret for period 3. --- briar-core/src/net/sf/briar/db/JdbcDatabase.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/briar-core/src/net/sf/briar/db/JdbcDatabase.java b/briar-core/src/net/sf/briar/db/JdbcDatabase.java index 1578e7d388..c54831de2d 100644 --- a/briar-core/src/net/sf/briar/db/JdbcDatabase.java +++ b/briar-core/src/net/sf/briar/db/JdbcDatabase.java @@ -879,9 +879,6 @@ abstract class JdbcDatabase implements Database<Connection> { batchAffected = ps.executeBatch(); if(batchAffected.length != secrets.size()) throw new DbStateException(); - for(int i = 0; i < batchAffected.length; i++) { - if(batchAffected[i] > 1) throw new DbStateException(); - } ps.close(); } catch(SQLException e) { tryToClose(ps); -- GitLab