diff options
author | Max Kellermann <max@duempel.org> | 2009-01-18 19:45:51 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-01-18 19:45:51 +0100 |
commit | 65f2386b39e88fd1ee5af65336e41ba184d31cf2 (patch) | |
tree | 695c14ea66774fda67000c3babeea770cf8d96bf /src/output/shout_plugin.c | |
parent | a531a1e65075d27574bc31d4bac7ab20cb750efd (diff) | |
download | mpd-65f2386b39e88fd1ee5af65336e41ba184d31cf2.tar.gz mpd-65f2386b39e88fd1ee5af65336e41ba184d31cf2.tar.xz mpd-65f2386b39e88fd1ee5af65336e41ba184d31cf2.zip |
conf: added config_get_block_unsigned()
Eliminate some more getBlockParam() invocations.
Diffstat (limited to '')
-rw-r--r-- | src/output/shout_plugin.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/output/shout_plugin.c b/src/output/shout_plugin.c index 069a0b307..7d3e4aaf0 100644 --- a/src/output/shout_plugin.c +++ b/src/output/shout_plugin.c @@ -221,14 +221,8 @@ static void *my_shout_init_driver(struct audio_output *audio_output, } /* optional paramters */ - block_param = getBlockParam(param, "timeout"); - if (block_param) { - sd->timeout = (int)strtol(block_param->value, &test, 10); - if (*test != '\0' || sd->timeout <= 0) { - g_error("shout timeout is not a positive integer, " - "line %i\n", block_param->line); - } - } + sd->timeout = config_get_block_unsigned(param, "timeout", + DEFAULT_CONN_TIMEOUT); value = config_get_block_string(param, "genre", NULL); if (value != NULL && shout_set_genre(sd->shout_conn, value)) { |