Commit 19a700b7 authored by Warren Dukes's avatar Warren Dukes

we need to initialize interface_max_connections to 0, to indicate we have no…

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
parent 0cf6a8c9
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment