Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update the version field in the handle when doing the automatic update.
  • Loading branch information
relyea%netscape.com committed Apr 12, 2002
1 parent b94b26f commit 954d936
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions security/nss/lib/softoken/keydb.c
Expand Up @@ -892,10 +892,16 @@ nsslowkey_OpenKeyDB(PRBool readOnly, const char *appName, const char *prefix,
handle->db = rdbopen( appName, prefix, "key", NO_CREATE);
handle->updatedb = dbopen( dbname, NO_RDONLY, 0600, DB_HASH, 0 );
if (handle->updatedb) {
db_Copy(handle->db, handle->updatedb);
(*handle->updatedb->close)(handle->updatedb);
handle->updatedb = NULL;
goto done;
handle->version = nsslowkey_version(handle->updatedb);
if (handle->version != NSSLOWKEY_DB_FILE_VERSION) {
(*handle->updatedb->close)(handle->updatedb);
handle->updatedb = NULL;
} else {
db_Copy(handle->db, handle->updatedb);
(*handle->updatedb->close)(handle->updatedb);
handle->updatedb = NULL;
goto done;
}
}
} else {
handle->db = dbopen( dbname, NO_CREATE, 0600, DB_HASH, 0 );
Expand Down

0 comments on commit 954d936

Please sign in to comment.