${module.submodule.item} now works properly
authoraland <aland>
Wed, 21 Jan 2004 20:52:42 +0000 (20:52 +0000)
committeraland <aland>
Wed, 21 Jan 2004 20:52:42 +0000 (20:52 +0000)
src/main/conffile.c

index a3879e8..7274321 100644 (file)
@@ -283,8 +283,25 @@ static const char *cf_expand_variables(const char *cf, int *lineno,
                                                cs = cs->item.parent;
                                        ptr++;
                                }
-                       } else { /* pick from this section. */
+
+                       } else {
+                               /*
+                                *      ${foo} is local, with
+                                *      main as lower priority
+                                */
                                cs = outercs;
+
+                               /*
+                                *      ${foo.bar.baz} is always rooted
+                                *      from the top.
+                                */
+                               for (q = ptr; *q && q != end; q++) {
+                                       if (*q == '.') {
+                                               cs = parentcs;
+                                               up = 1;
+                                               break;
+                                       }
+                               }
                        }
 
                        while (cp == NULL) {