aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeal H. Walfield <[email protected]>2015-10-20 13:12:23 +0000
committerNeal H. Walfield <[email protected]>2015-10-20 13:12:23 +0000
commit26d457c218c2e93b2e2cf316f0c1074c70894d0f (patch)
tree4283b0f85db6384ebee455cc70918fec67999f8b
parentgpg: Improve output. (diff)
downloadgnupg-26d457c218c2e93b2e2cf316f0c1074c70894d0f.tar.gz
gnupg-26d457c218c2e93b2e2cf316f0c1074c70894d0f.zip
gpg: Don't die immediately if the TOFU DB is locked.
* g10/tofu.c (opendb): Don't die immediately if the DB is locked. -- Signed-off-by: Neal H. Walfield <[email protected]>
Diffstat (limited to '')
-rw-r--r--g10/tofu.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/g10/tofu.c b/g10/tofu.c
index 3f2cd2512..4ad44eb81 100644
--- a/g10/tofu.c
+++ b/g10/tofu.c
@@ -487,6 +487,10 @@ opendb (char *filename, enum db_type type)
db = NULL;
}
+ /* If a DB is locked wait up to 5 seconds for the lock to be cleared
+ before failing. */
+ sqlite3_busy_timeout (db, 5 * 1000);
+
if (filename_free)
xfree (filename);