Skip to content
Snippets Groups Projects
Commit e0b8056d authored by Jan Kadlec's avatar Jan Kadlec
Browse files

persistent-events: Moved timer db opening from main to conf.c

parent bba2fd89
No related branches found
No related tags found
1 merge request!287Persistent events
......@@ -779,6 +779,12 @@ int conf_open(const char* path)
conf_free(nconf);
return ret;
}
/* Open zone timers db. */
ret = open_timers_db(nconf);
if (ret != KNOT_EOK) {
log_warning("Cannot open timers db (%s)\n", knot_strerror(ret));
}
/* Replace current config. */
conf_t **current_config = &s_config;
......@@ -787,6 +793,8 @@ int conf_open(const char* path)
/* Synchronize. */
synchronize_rcu();
#warning double check synchronization
if (oldconf) {
/* Copy hooks. */
......@@ -800,12 +808,10 @@ int conf_open(const char* path)
/* Update hooks. */
conf_update_hooks(nconf);
/* Close old timers db. */
close_timers_db(oldconf);
/* Free old config. */
conf_free(oldconf);
}
return KNOT_EOK;
}
......
......@@ -325,12 +325,6 @@ int main(int argc, char **argv)
log_info("changed directory to %s", daemon_root);
}
}
/* Open zone timers db. */
int ret = open_timers_db(config);
if (ret != KNOT_EOK) {
log_warning("Cannot open timers db (%s)\n", knot_strerror(ret));
}
/* Register base signal handling. */
struct sigaction emptyset;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment