hold lock during db enum -- reduce memory requirements by serializing updates (partcuarly with rescan_interval), and because the enum isn't currently reentrant

This commit is contained in:
Ron Pedde 2004-09-18 05:24:34 +00:00
parent 537233256b
commit 78ba4d7f20
1 changed files with 1 additions and 6 deletions

View File

@ -348,12 +348,9 @@ int db_scanning(void) {
*/
int db_version(void) {
int version;
int err;
db_readlock();
version=db_version_no;
db_unlock();
return version;
@ -897,9 +894,6 @@ ENUMHANDLE db_enum_begin(void) {
}
helper->next = helper->root;
db_unlock();
return helper;
}
@ -1034,6 +1028,7 @@ int db_enum_end(ENUMHANDLE handle) {
free(helper);
db_unlock();
return 0;
}