Bugzilla – Bug 1350
make cachedb backend configurable
Last modified: 2017-07-17 10:21:53 CEST
Created attachment 425 [details]
I'd like to propose the attached patch. It implements the following TODO of
the cachedb module:
cachedb_apply_cfg(struct cachedb_env* cachedb_env, struct config_file* cfg)
const char* backend_str = "testframe"; /* TODO get from cfg */
I chose to implement it in a separate config section 'cachedb:' in case
it might be used other apps than the unbound server, but that's not a
strong opinion. If this was a bad choice I'm happy to update the patch.
Basically it doesn't change the behavior - it still only recognizes the
'testframe' backend, which is the default. But there are a couple of
- an empty backend name is now refused. again, not a strong opinion
but I didn't think of any useful case of it (this is different from
the default) and I thought it rather confusing to silently ignore
such a case.
- it fixed a minor typo in the error log message: s/'%s/'%s'/
The patch cleanly applies to svn trunk revision 4274, the updated code
compiled and passed both 'make test' and 'make longtest'.
note: I intentionally excluded autogenerated files by lex and yacc
as they would just make it less readable and I guess you'll re-generate
Thank you for the patch! I have applied it.
Best regards, Wouter