]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Print correct module that failed when module-config is wrong.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 28 Feb 2019 09:56:45 +0000 (09:56 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 28 Feb 2019 09:56:45 +0000 (09:56 +0000)
git-svn-id: file:///svn/unbound/trunk@5128 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
services/modstack.c

index 46b678acff4dcc730d03e89211494171be6f593c..9ff492836456e69570684d0b994ec34637dc8496 100644 (file)
@@ -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
index c6e5fd01e1604b6ada2f19c3cdd845cc915579b1..fb9c3f54e015c5d4064e98f4fc8ad135e1bc17b2 100644 (file)
@@ -113,10 +113,13 @@ modstack_config(struct module_stack* stack, const char* module_conf)
         for(i=0; i<stack->num; 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;
                 }
         }