diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2004-10-31 15:37:54 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2004-10-31 15:37:54 +0000 |
commit | 19a700b78b0ff17ef64c85f0e6512112831af900 (patch) | |
tree | f3a70a550ca7c94fe9599dd36fbf13c9815ca51e /src/interface.c | |
parent | 0cf6a8c96a284a3241146855db7e84675ca5b45a (diff) | |
download | mpd-19a700b78b0ff17ef64c85f0e6512112831af900.tar.gz mpd-19a700b78b0ff17ef64c85f0e6512112831af900.tar.xz mpd-19a700b78b0ff17ef64c85f0e6512112831af900.zip |
we need to initialize interface_max_connections to 0, to indicate we have no open/possible interfaces for interfacePrintWithFD() (i.e. so we don't get a segfault when creating the db, or other potential problems)
git-svn-id: https://svn.musicpd.org/mpd/trunk@2434 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/interface.c')
-rw-r--r-- | src/interface.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/interface.c b/src/interface.c index 4282b89be..72c71f911 100644 --- a/src/interface.c +++ b/src/interface.c @@ -53,7 +53,8 @@ #define INTERFACE_MAX_COMMAND_LIST_DEFAULT (2048*1024) #define INTERFACE_MAX_OUTPUT_BUFFER_SIZE_DEFAULT (2048*1024) -static int interface_max_connections = INTERFACE_MAX_CONNECTIONS_DEFAULT; +/* set this to zero to indicate we have no possible interfaces */ +static int interface_max_connections = 0; /*INTERFACE_MAX_CONNECTIONS_DEFAULT;*/ static int interface_timeout = INTERFACE_TIMEOUT_DEFAULT; static size_t interface_max_command_list_size = INTERFACE_MAX_COMMAND_LIST_DEFAULT; @@ -450,6 +451,7 @@ void initInterfaces() { exit(EXIT_FAILURE); } } + else interface_max_connections = INTERFACE_MAX_CONNECTIONS_DEFAULT; param = getConfigParam(CONF_MAX_COMMAND_LIST_SIZE); |