[srvx-commits] CVS: services/src saxdb.c,1.25,1.26
Brought to you by:
entrope
|
From: Zoot <zo...@us...> - 2002-12-22 00:36:19
|
Update of /cvsroot/srvx/services/src
In directory sc8-pr-cvs1:/tmp/cvs-serv21076/src
Modified Files:
saxdb.c
Log Message:
Fix periodic database writes for databases without any configuration section.
Index: saxdb.c
===================================================================
RCS file: /cvsroot/srvx/services/src/saxdb.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -r1.25 -r1.26
*** saxdb.c 18 Dec 2002 19:06:11 -0000 1.25
--- saxdb.c 22 Dec 2002 00:36:16 -0000 1.26
***************
*** 95,104 ****
str = database_get_data(conf, "frequency", RECDB_QSTRING);
db->write_interval = str ? ParseInterval(str) : 1800;
- if (db->write_interval && !db->mondo_section) {
- timeq_add(now + db->write_interval, saxdb_timed_write, db);
- }
filename = database_get_data(conf, "filename", RECDB_QSTRING);
} else {
db->write_interval = 1800;
}
/* Insert filename */
--- 95,105 ----
str = database_get_data(conf, "frequency", RECDB_QSTRING);
db->write_interval = str ? ParseInterval(str) : 1800;
filename = database_get_data(conf, "filename", RECDB_QSTRING);
} else {
db->write_interval = 1800;
+ }
+ /* Schedule database writes */
+ if (db->write_interval && !db->mondo_section) {
+ timeq_add(now + db->write_interval, saxdb_timed_write, db);
}
/* Insert filename */
|