X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Fecoli_config.c;h=fd709f20f4c860e40123caa111a8fd241fe6a90f;hb=51028779e0a8772091aec5ab96bcf2519cf2f1ad;hp=aa2d7e30ddef8349b4540da820686fcf9d68e6a3;hpb=9c24cb4c317ef9427903ff888b1d9b481372e5ea;p=protos%2Flibecoli.git diff --git a/lib/ecoli_config.c b/lib/ecoli_config.c index aa2d7e3..fd709f2 100644 --- a/lib/ecoli_config.c +++ b/lib/ecoli_config.c @@ -184,6 +184,11 @@ ec_config_schema_dump(FILE *out, const struct ec_config_schema *schema, __ec_config_schema_dump(out, schema, schema_len, 0); } +enum ec_config_type ec_config_get_type(const struct ec_config *config) +{ + return config->type; +} + struct ec_config * ec_config_bool(bool boolean) { @@ -621,7 +626,7 @@ int ec_config_list_add(struct ec_config *list, struct ec_config *value) { - if (list == NULL || list->type != EC_CONFIG_TYPE_LIST) { + if (list == NULL || list->type != EC_CONFIG_TYPE_LIST || value == NULL) { errno = EINVAL; goto fail; }