diff options
author | J. Alexander Treuman <jat@spatialrift.net> | 2007-06-13 15:37:46 +0000 |
---|---|---|
committer | J. Alexander Treuman <jat@spatialrift.net> | 2007-06-13 15:37:46 +0000 |
commit | df32eed2cc6ebc11dcecb954e0ddb3cdf329ce1f (patch) | |
tree | ddd2902dabdd48a53c3826a4891f896ac47cb7f4 | |
parent | c734c13b5c5c225c2119f6245963d20e207feef0 (diff) | |
download | mpd-df32eed2cc6ebc11dcecb954e0ddb3cdf329ce1f.tar.gz mpd-df32eed2cc6ebc11dcecb954e0ddb3cdf329ce1f.tar.xz mpd-df32eed2cc6ebc11dcecb954e0ddb3cdf329ce1f.zip |
Use parsePath for the fifo output's path parameter.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6623 09075e82-0dd4-0310-85a5-a0d7c8717e4f
-rw-r--r-- | src/audioOutputs/audioOutput_fifo.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/audioOutputs/audioOutput_fifo.c b/src/audioOutputs/audioOutput_fifo.c index 2fbbf5393..66c54dd7f 100644 --- a/src/audioOutputs/audioOutput_fifo.c +++ b/src/audioOutputs/audioOutput_fifo.c @@ -164,23 +164,23 @@ static int openFifo(FifoData *fd) static int fifo_initDriver(AudioOutput *audioOutput, ConfigParam *param) { FifoData *fd; - BlockParam *path = NULL; - - if (param) - path = getBlockParam(param, "path"); + BlockParam *blockParam; + char *path; - if (!path) { + blockParam = getBlockParam(param, "path"); + if (!blockParam) { FATAL("No \"path\" parameter specified for fifo output " "defined at line %i\n", param->line); } - if (path->value[0] != '/') { - FATAL("\"path\" parameter for fifo output is not an absolute " - "path at line %i\n", param->line); + path = parsePath(blockParam->value); + if (!path) { + FATAL("Could not parse \"path\" parameter for fifo output " + "at line %i\n", blockParam->line); } fd = newFifoData(); - fd->path = xstrdup(path->value); + fd->path = path; audioOutput->data = fd; if (openFifo(fd) < 0) { |