From: Max Kellermann Date: Wed, 2 Aug 2017 07:18:13 +0000 (+0200) Subject: options: don't override the libmpdclient default timeout X-Git-Tag: v0.28~15 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=18291a2e89995a1fb23a6a23b42f28d14bbc13fb;p=ncmpc.git options: don't override the libmpdclient default timeout libmpdclient's default is 30s, which is just as good as our 5s timeout. Why change that with extra code? --- diff --git a/src/defaults.h b/src/defaults.h index bcd21ac..258a874 100644 --- a/src/defaults.h +++ b/src/defaults.h @@ -34,8 +34,6 @@ #define DEFAULT_LYRICS_TIMEOUT 100 -#define DEFAULT_MPD_TIMEOUT 5000 /* 5 seconds */ - #define DEFAULT_SCROLL TRUE #define DEFAULT_SCROLL_SEP " *** " diff --git a/src/options.c b/src/options.c index f6fa63f..ca6d415 100644 --- a/src/options.c +++ b/src/options.c @@ -61,7 +61,7 @@ options_t options = { .audible_bell = true, .bell_on_wrap = true, .status_message_time = 3, - .timeout_ms = DEFAULT_MPD_TIMEOUT, + .timeout_ms = 0, #ifndef NCMPC_MINI .scroll = DEFAULT_SCROLL, .welcome_screen_list = true, @@ -384,9 +384,6 @@ options_init(void) #ifndef NCMPC_MINI options.scroll_sep = g_strdup(DEFAULT_SCROLL_SEP); #endif - if (getenv("MPD_TIMEOUT") != NULL) - /* let libmpdclient parse the environment variable */ - options.timeout_ms = 0; } void