diff options
author | Max Kellermann <max@duempel.org> | 2008-09-10 11:41:33 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-10 11:41:33 +0200 |
commit | a49b1d145e9c496331ac3c37bfbacb169599ddc0 (patch) | |
tree | 6e43d1c91b4128f4ea873fa99dbd8bfe855da14b /src/client.c | |
parent | be9212ba84a43a1c7ce4c4dcf179bb9ef08929f7 (diff) | |
download | mpd-a49b1d145e9c496331ac3c37bfbacb169599ddc0.tar.gz mpd-a49b1d145e9c496331ac3c37bfbacb169599ddc0.tar.xz mpd-a49b1d145e9c496331ac3c37bfbacb169599ddc0.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.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/client.c b/src/client.c index f0603b3bb..8c44f4308 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; |