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 <neal@g10code.com>
This commit is contained in:
Neal H. Walfield 2015-10-20 15:12:23 +02:00
parent bc9ff6c85e
commit 26d457c218
1 changed files with 4 additions and 0 deletions

View File

@ -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);