X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fconfigfile.c;h=0e28e92f9ed0d2e526d768e87f539794b3b5aa5a;hb=b6284281cf7d745bfa87befe08bba8470548f83c;hp=bb1770d2ab13e8c8a26c84901dd9e012dd0fc9a7;hpb=619f112a584fcd89d2e8df7781a0a01341188189;p=collectd.git diff --git a/src/configfile.c b/src/configfile.c index bb1770d2..0e28e92f 100644 --- a/src/configfile.c +++ b/src/configfile.c @@ -172,7 +172,7 @@ static int cf_dispatch (const char *type, const char *orig_key, free (key); free (value); - DEBUG ("return (%i)", ret); + DEBUG ("cf_dispatch: return (%i)", ret); return (ret); } /* int cf_dispatch */ @@ -208,13 +208,18 @@ static int dispatch_value_typesdb (const oconfig_item_t *ci) cf_default_typesdb = 0; - if (ci->values_num < 1) + if (ci->values_num < 1) { + ERROR ("configfile: `TypesDB' needs at least one argument."); return (-1); + } for (i = 0; i < ci->values_num; ++i) { - if (OCONFIG_TYPE_STRING != ci->values[i].type) + if (OCONFIG_TYPE_STRING != ci->values[i].type) { + WARNING ("configfile: TypesDB: Skipping %i. argument which " + "is not a string.", i + 1); continue; + } read_types_list (ci->values[i].value.string); }