From 6a2cf38465fbafcfd5cb009ea58dd543bbdbdfea Mon Sep 17 00:00:00 2001 From: "J. Alexander Treuman" Date: Wed, 10 May 2006 02:17:47 +0000 Subject: My first commit! :D Make sure the same interface isn't closed twice when max_command_list_size is exceeded, and don't abort mpd should the same interface be closed twice somewhere else. git-svn-id: https://svn.musicpd.org/mpd/trunk@4151 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/interface.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/interface.c b/src/interface.c index 5060ea8ee..952ffb3a3 100644 --- a/src/interface.c +++ b/src/interface.c @@ -136,7 +136,7 @@ void openInterface(Interface * interface, int fd) { } void closeInterface(Interface * interface) { - assert(interface->open); + if (!interface->open) return; interface->open = 0; @@ -254,6 +254,7 @@ static int proccessLineOfInput(Interface * interface) { interface_max_command_list_size) ; closeInterface(interface); + ret = COMMAND_RETURN_CLOSE; } else { insertInListWithoutKey(interface->commandList, -- cgit v1.2.3