aboutsummaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
Diffstat (limited to 'g10')
-rw-r--r--g10/ChangeLog4
-rw-r--r--g10/tdbio.c5
2 files changed, 9 insertions, 0 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index 61551dc5d..996c6cf1a 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,7 @@
+Sat Feb 13 14:13:04 CET 1999 Werner Koch <[email protected]>
+
+ * tdbio.c (tdbio_set_dbname): Init lockhandle for a new trustdb
+
Wed Feb 10 17:15:39 CET 1999 Werner Koch <[email protected]>
* g10.c (main): check for development version now in configure
diff --git a/g10/tdbio.c b/g10/tdbio.c
index 2eddb4b2d..6aaa18012 100644
--- a/g10/tdbio.c
+++ b/g10/tdbio.c
@@ -466,6 +466,11 @@ tdbio_set_dbname( const char *new_dbname, int create )
if( db_fd == -1 )
log_fatal( _("%s: can't open: %s\n"), db_name, strerror(errno) );
+ if( !lockhandle )
+ lockhandle = create_dotlock( db_name );
+ if( !lockhandle )
+ log_fatal( _("%s: can't create lock\n"), db_name );
+
memset( &rec, 0, sizeof rec );
rec.r.ver.version = 2;
rec.r.ver.created = make_timestamp();