Use new conf filename api
authoraland <aland>
Tue, 19 Jun 2007 12:46:57 +0000 (12:46 +0000)
committeraland <aland>
Tue, 19 Jun 2007 12:46:57 +0000 (12:46 +0000)
src/main/evaluate.c
src/main/mainconfig.c

index 75a427e..3d1e3fd 100644 (file)
@@ -920,6 +920,7 @@ struct conf_item {
        struct conf_item *next;
        struct conf_part *parent;
        int lineno;
+       const char *filename;
        CONF_ITEM_TYPE type;
 };
 struct conf_pair {
index b366807..ba251d6 100644 (file)
@@ -708,7 +708,8 @@ int read_mainconfig(int reload)
                                                                        name1,
                                                                        value);
                                        if (!tts) {
-                                               radlog(L_ERR|L_CONS, "%s[%d]: Section refers to non-existent template \"%s\"", buffer, cf_section_lineno(mycs), value);
+                                               radlog(L_ERR|L_CONS, "%s[%d]: Section refers to non-existent template \"%s\"",
+                                                      cf_section_filename(mycs), cf_section_lineno(mycs), value);
                                                return -1;
                                        }
                                        cf_section_template(mycs, tts);
@@ -835,9 +836,7 @@ int read_mainconfig(int reload)
        cf_section_free(&mainconfig.config);
        mainconfig.config = cs;
 
-       snprintf(buffer, sizeof(buffer), "%.200s/%.50s",
-                radius_dir, mainconfig.radiusd_conf);
-       if (!realms_init(buffer)) {
+       if (!realms_init()) {
                return -1;
        }