diff options
Diffstat (limited to 'src/conf.c')
-rw-r--r-- | src/conf.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/conf.c b/src/conf.c index a073f32a5..73990d45d 100644 --- a/src/conf.c +++ b/src/conf.c @@ -445,6 +445,18 @@ bool config_get_bool(const char *name, bool default_value) return !!value; } +const char * +config_get_block_string(struct config_param *param, const char *name, + const char *default_value) +{ + struct block_param *bp = getBlockParam(param, name); + + if (bp == NULL) + return default_value; + + return bp->value; +} + bool config_get_block_bool(struct config_param *param, const char *name, bool default_value) |