From: aland Date: Thu, 3 May 2007 08:29:27 +0000 (+0000) Subject: More readable debug output X-Git-Tag: release_2_0_0_pre1~52 X-Git-Url: http://www.project-moonshot.org/gitweb/?a=commitdiff_plain;h=55db2529fb1cf26f22712e60a6fffa574e846dcd;p=freeradius.git More readable debug output --- diff --git a/src/main/conffile.c b/src/main/conffile.c index d52f9ad..5d6ff1b 100644 --- a/src/main/conffile.c +++ b/src/main/conffile.c @@ -890,6 +890,12 @@ int cf_section_parse(CONF_SECTION *cs, void *base, int i; void *data; + if (!cs->name2) { + DEBUG2(" %s {", cs->name1); + } else { + DEBUG2(" %s %s {", cs->name1, cs->name2); + } + /* * Handle the known configuration parameters. */ @@ -913,12 +919,14 @@ int cf_section_parse(CONF_SECTION *cs, void *base, if (!variables[i].dflt) { DEBUG2("Internal sanity check 1 failed in cf_section_parse"); cf_section_parse_free(base, variables); + DEBUG2(" }"); return -1; } if (cf_section_parse(subcs, base, (const CONF_PARSER *) variables[i].dflt) < 0) { cf_section_parse_free(base, variables); + DEBUG2(" }"); return -1; } continue; @@ -931,6 +939,7 @@ int cf_section_parse(CONF_SECTION *cs, void *base, } else { DEBUG2("Internal sanity check 2 failed in cf_section_parse"); cf_section_parse_free(base, variables); + DEBUG2(" }"); return -1; } @@ -940,10 +949,13 @@ int cf_section_parse(CONF_SECTION *cs, void *base, if (cf_item_parse(cs, variables[i].name, variables[i].type, data, variables[i].dflt) < 0) { cf_section_parse_free(base, variables); + DEBUG2(" }"); return -1; } } /* for all variables in the configuration section */ + DEBUG2(" }"); + cs->base = base; cs->variables = variables; diff --git a/src/main/modules.c b/src/main/modules.c index 41a71e4..f4cf917 100644 --- a/src/main/modules.c +++ b/src/main/modules.c @@ -302,11 +302,6 @@ module_instance_t *find_module_instance(CONF_SECTION *modules, } DEBUG2("Module: Instantiating %s", instname); - if (name2) { - DEBUG(" %s %s {", name1, name2); - } else { - DEBUG(" %s {", name1); - } /* * Call the module's instantiation routine. @@ -349,8 +344,6 @@ module_instance_t *find_module_instance(CONF_SECTION *modules, #endif cf_data_add(cs, "instance", node, module_instance_free); - DEBUG2(" }"); - return node; } diff --git a/src/modules/rlm_eap/eap.c b/src/modules/rlm_eap/eap.c index 3b1225f..06689f1 100644 --- a/src/modules/rlm_eap/eap.c +++ b/src/modules/rlm_eap/eap.c @@ -120,6 +120,10 @@ int eaptype_load(EAP_TYPES **type, int eap_type, CONF_SECTION *cs) free(node); return -1; } + DEBUG("eap: Linked to sub-module %s", buffer); + + DEBUG("eap: Instantiating eap-%s", eaptype_name); + if ((node->type->attach) && ((node->type->attach)(node->cs, &(node->type_data)) < 0)) { @@ -130,7 +134,6 @@ int eaptype_load(EAP_TYPES **type, int eap_type, CONF_SECTION *cs) return -1; } - DEBUG("rlm_eap: Loaded and initialized type %s", eaptype_name); *type = node; return 0; }