aboutsummaryrefslogtreecommitdiffstats
path: root/src/output/jack_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-18 19:37:27 +0100
committerMax Kellermann <max@duempel.org>2009-01-18 19:37:27 +0100
commita531a1e65075d27574bc31d4bac7ab20cb750efd (patch)
treef06ad8e7359f0845d94d2b8a6f655a0cceb744c2 /src/output/jack_plugin.c
parent73e466cfef6497aff840cfac35d80d74e7b0fd0c (diff)
downloadmpd-a531a1e65075d27574bc31d4bac7ab20cb750efd.tar.gz
mpd-a531a1e65075d27574bc31d4bac7ab20cb750efd.tar.xz
mpd-a531a1e65075d27574bc31d4bac7ab20cb750efd.zip
conf: added config_get_block_string()
This replaces lots of getBlockParam() invocations.
Diffstat (limited to '')
-rw-r--r--src/output/jack_plugin.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/output/jack_plugin.c b/src/output/jack_plugin.c
index 5723a04ca..224fcd341 100644
--- a/src/output/jack_plugin.c
+++ b/src/output/jack_plugin.c
@@ -186,6 +186,7 @@ mpd_jack_init(struct audio_output *ao,
struct config_param *param)
{
struct jack_data *jd;
+ const char *value;
struct block_param *bp;
char *endptr;
int val;
@@ -197,12 +198,13 @@ mpd_jack_init(struct audio_output *ao,
if (param == NULL)
return jd;
- if ( (bp = getBlockParam(param, "ports")) ) {
- char **ports = g_strsplit(bp->value, ",", 0);
+ value = config_get_block_string(param, "ports", NULL);
+ if (value != NULL) {
+ char **ports = g_strsplit(value, ",", 0);
if (ports[0] == NULL || ports[1] == NULL || ports[2] != NULL)
g_error("two port names expected in line %d",
- bp->line);
+ param->line);
jd->output_ports[0] = ports[0];
jd->output_ports[1] = ports[1];