Merge branch 'master' of git+ssh://playfair.gnupg.org/git/gnupg

This commit is contained in:
Werner Koch 2016-06-16 18:44:05 +02:00
commit 5dea40f810
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
1 changed files with 6 additions and 2 deletions

View File

@ -119,6 +119,7 @@ static int in_transaction;
static void open_db (void);
static void create_hashtable (TRUSTREC *vr, int type);
@ -582,8 +583,13 @@ create_version_record (void)
rec.rectype = RECTYPE_VER;
rec.recnum = 0;
rc = tdbio_write_record (&rec);
if (!rc)
tdbio_sync ();
if (!rc)
create_hashtable (&rec, 0);
return rc;
}
@ -957,8 +963,6 @@ get_trusthashrec(void)
if (rc)
log_fatal (_("%s: error reading version record: %s\n"),
db_name, gpg_strerror (rc) );
if (!vr.r.ver.trusthashtbl)
create_hashtable (&vr, 0);
trusthashtbl = vr.r.ver.trusthashtbl;
}