From: Wouter Wijngaards Date: Thu, 28 Feb 2019 09:56:45 +0000 (+0000) Subject: - Print correct module that failed when module-config is wrong. X-Git-Tag: release-1.9.1rc1~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a82c0eeece4482b3d7143f5b97a87116dc7d1a61;p=thirdparty%2Funbound.git - Print correct module that failed when module-config is wrong. git-svn-id: file:///svn/unbound/trunk@5128 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/doc/Changelog b/doc/Changelog index 46b678acf..9ff492836 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,6 +1,7 @@ 28 February 2019: Wouter - Remove memory leak on pythonmod python2 script file init. - Remove swig gcc8 python function cast warnings, they are ignored. + - Print correct module that failed when module-config is wrong. 27 February 2019: Wouter - Fix #4229: Unbound man pages lack information, about access-control diff --git a/services/modstack.c b/services/modstack.c index c6e5fd01e..fb9c3f54e 100644 --- a/services/modstack.c +++ b/services/modstack.c @@ -113,10 +113,13 @@ modstack_config(struct module_stack* stack, const char* module_conf) for(i=0; inum; i++) { stack->mod[i] = module_factory(&module_conf); if(!stack->mod[i]) { + char md[256]; + snprintf(md, sizeof(md), "%s", module_conf); + if(strchr(md, ' ')) *(strchr(md, ' ')) = 0; log_err("Unknown value in module-config, module: '%s'." " This module is not present (not compiled in)," " See the list of linked modules with unbound -h", - module_conf); + md); return 0; } }