aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-10 11:41:33 +0200
committerEric Wong <normalperson@yhbt.net>2008-09-10 23:33:59 -0700
commit44fc077f3bc6855bc83acaae9d43cf1e7ccc749a (patch)
treee372a365b3c5165ec3380d7a0f6772e816ee4042
parent2c0e478e371d14df47d7a7f31515bbd1091f5b6a (diff)
downloadmpd-44fc077f3bc6855bc83acaae9d43cf1e7ccc749a.tar.gz
mpd-44fc077f3bc6855bc83acaae9d43cf1e7ccc749a.tar.xz
mpd-44fc077f3bc6855bc83acaae9d43cf1e7ccc749a.zip
client: moved CLOSE/KILL check after client_process_line()
Don't update client data if it is going to be closed anyway.
Diffstat (limited to '')
-rw-r--r--src/client.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/client.c b/src/client.c
index d04cac31f..615e67ace 100644
--- a/src/client.c
+++ b/src/client.c
@@ -419,6 +419,9 @@ static int client_input_received(struct client *client, int bytesRead)
*(buf_tail - 1) = '\0';
}
ret = client_process_line(client);
+ if (ret == COMMAND_RETURN_KILL ||
+ ret == COMMAND_RETURN_CLOSE)
+ return ret;
if (client_is_expired(client))
return ret;
client->bufferPos = client->bufferLength;
@@ -442,10 +445,6 @@ static int client_input_received(struct client *client, int bytesRead)
client->bufferLength);
client->bufferPos = 0;
}
- if (ret == COMMAND_RETURN_KILL || ret == COMMAND_RETURN_CLOSE) {
- return ret;
- }
-
}
return ret;