Commit 6a2cf384 authored by J. Alexander Treuman's avatar J. Alexander Treuman

My first commit! :D Make sure the same interface isn't closed twice when…

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
parent 66e4379d
...@@ -136,7 +136,7 @@ void openInterface(Interface * interface, int fd) { ...@@ -136,7 +136,7 @@ void openInterface(Interface * interface, int fd) {
} }
void closeInterface(Interface * interface) { void closeInterface(Interface * interface) {
assert(interface->open); if (!interface->open) return;
interface->open = 0; interface->open = 0;
...@@ -254,6 +254,7 @@ static int proccessLineOfInput(Interface * interface) { ...@@ -254,6 +254,7 @@ static int proccessLineOfInput(Interface * interface) {
interface_max_command_list_size) interface_max_command_list_size)
; ;
closeInterface(interface); closeInterface(interface);
ret = COMMAND_RETURN_CLOSE;
} }
else { else {
insertInListWithoutKey(interface->commandList, insertInListWithoutKey(interface->commandList,
......
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