aboutsummaryrefslogtreecommitdiffstats
path: root/src/output/fifo_output_plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/output/fifo_output_plugin.c')
-rw-r--r--src/output/fifo_output_plugin.c27
1 files changed, 11 insertions, 16 deletions
diff --git a/src/output/fifo_output_plugin.c b/src/output/fifo_output_plugin.c
index f4217ec4d..708062552 100644
--- a/src/output/fifo_output_plugin.c
+++ b/src/output/fifo_output_plugin.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2010 The Music Player Daemon Project
+ * Copyright (C) 2003-2011 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -42,7 +42,7 @@ struct fifo_data {
int input;
int output;
bool created;
- Timer *timer;
+ struct timer *timer;
};
/**
@@ -178,30 +178,25 @@ fifo_open(struct fifo_data *fd, GError **error)
static void *
fifo_output_init(G_GNUC_UNUSED const struct audio_format *audio_format,
const struct config_param *param,
- GError **error)
+ GError **error_r)
{
struct fifo_data *fd;
- char *value, *path;
-
- value = config_dup_block_string(param, "path", NULL);
- if (value == NULL) {
- g_set_error(error, fifo_output_quark(), errno,
- "No \"path\" parameter specified");
- return NULL;
- }
- path = parsePath(value);
- g_free(value);
+ GError *error = NULL;
+ char *path = config_dup_block_path(param, "path", &error);
if (!path) {
- g_set_error(error, fifo_output_quark(), errno,
- "Could not parse \"path\" parameter");
+ if (error != NULL)
+ g_propagate_error(error_r, error);
+ else
+ g_set_error(error_r, fifo_output_quark(), 0,
+ "No \"path\" parameter specified");
return NULL;
}
fd = fifo_data_new();
fd->path = path;
- if (!fifo_open(fd, error)) {
+ if (!fifo_open(fd, error_r)) {
fifo_data_free(fd);
return NULL;
}