aboutsummaryrefslogtreecommitdiffstats
path: root/src/audioOutputs/audioOutput_shout.c
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2007-09-05 23:59:36 +0000
committerEric Wong <normalperson@yhbt.net>2007-09-05 23:59:36 +0000
commitb2ae8da5097b637f9b1a1a6ae98eee6a82e2cfe4 (patch)
tree32bf36b1c5d08c41c749d4907acd1c67868b8723 /src/audioOutputs/audioOutput_shout.c
parent4a2122eaf4bffdf7ebb012fe6348602d8e54ced0 (diff)
downloadmpd-b2ae8da5097b637f9b1a1a6ae98eee6a82e2cfe4.tar.gz
mpd-b2ae8da5097b637f9b1a1a6ae98eee6a82e2cfe4.tar.xz
mpd-b2ae8da5097b637f9b1a1a6ae98eee6a82e2cfe4.zip
conf: use getBoolBlockParam for block params, too
git-svn-id: https://svn.musicpd.org/mpd/trunk@6858 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/audioOutputs/audioOutput_shout.c')
-rw-r--r--src/audioOutputs/audioOutput_shout.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/audioOutputs/audioOutput_shout.c b/src/audioOutputs/audioOutput_shout.c
index a58ece755..455a635f6 100644
--- a/src/audioOutputs/audioOutput_shout.c
+++ b/src/audioOutputs/audioOutput_shout.c
@@ -124,7 +124,7 @@ static int myShout_initDriver(AudioOutput * audioOutput, ConfigParam * param)
char *user;
char *name;
BlockParam *blockParam;
- unsigned int public = 0;
+ unsigned int public;
sd = newShoutData();
@@ -154,15 +154,9 @@ static int myShout_initDriver(AudioOutput * audioOutput, ConfigParam * param)
checkBlockParam("name");
name = blockParam->value;
- blockParam = getBlockParam(param, "public");
- if (blockParam) {
- if (0 == strcmp(blockParam->value, "yes")) {
- public = 1;
- } else if (strcmp(blockParam->value, "no")) {
- FATAL("public \"%s\" is not \"yes\" or \"no\" at line "
- "%i\n", param->value, param->line);
- }
- }
+ public = getBoolBlockParam(param, "public", 1);
+ if (public == CONF_BOOL_UNSET)
+ public = 0;
blockParam = getBlockParam(param, "user");
if (blockParam)