aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJ. Alexander Treuman <jat@spatialrift.net>2006-05-10 02:17:47 +0000
committerJ. Alexander Treuman <jat@spatialrift.net>2006-05-10 02:17:47 +0000
commit6a2cf38465fbafcfd5cb009ea58dd543bbdbdfea (patch)
tree2fde4645807e1a149877c196b9b4e8e084268a65 /src
parent66e4379d698172fe7c3f17799eb24628df79bffa (diff)
downloadmpd-6a2cf38465fbafcfd5cb009ea58dd543bbdbdfea.tar.gz
mpd-6a2cf38465fbafcfd5cb009ea58dd543bbdbdfea.tar.xz
mpd-6a2cf38465fbafcfd5cb009ea58dd543bbdbdfea.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/interface.c3
1 files changed, 2 insertions, 1 deletions
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,