Use parsePath for the fifo output's path parameter.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6623 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
c734c13b5c
commit
df32eed2cc
|
@ -164,23 +164,23 @@ static int openFifo(FifoData *fd)
|
|||
static int fifo_initDriver(AudioOutput *audioOutput, ConfigParam *param)
|
||||
{
|
||||
FifoData *fd;
|
||||
BlockParam *path = NULL;
|
||||
BlockParam *blockParam;
|
||||
char *path;
|
||||
|
||||
if (param)
|
||||
path = getBlockParam(param, "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) {
|
||||
|
|
Loading…
Reference in New Issue