aboutsummaryrefslogtreecommitdiffstats
path: root/src/client.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-08-28 20:03:49 +0200
committerMax Kellermann <max@duempel.org>2008-08-28 20:03:49 +0200
commit4448b17e2ec03f5544ab7076571aa661ff3e6ec0 (patch)
tree3dbebfbc3e82d1cc926aebc5a0f6526346c9b780 /src/client.c
parent61443c13e6c443eada93d15d85336ebcfe5ce581 (diff)
downloadmpd-4448b17e2ec03f5544ab7076571aa661ff3e6ec0.tar.gz
mpd-4448b17e2ec03f5544ab7076571aa661ff3e6ec0.tar.xz
mpd-4448b17e2ec03f5544ab7076571aa661ff3e6ec0.zip
don't free client resources except in client_close()
All of the client's resources are freed in client_close(). It is enough to set the "expired" flag, no need to duplicate lots of destruction code again and again.
Diffstat (limited to '')
-rw-r--r--src/client.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/client.c b/src/client.c
index 54867044c..b646a1b67 100644
--- a/src/client.c
+++ b/src/client.c
@@ -670,14 +670,6 @@ static void client_write_deferred(struct client *client)
/* cause client to close */
DEBUG("client %i: problems flushing buffer\n",
client->num);
- buf = client->deferred_send;
- do {
- struct sllnode *prev = buf;
- buf = buf->next;
- free(prev);
- } while (buf);
- client->deferred_send = NULL;
- client->deferred_bytes = 0;
client->expired = 1;
}
}
@@ -747,13 +739,6 @@ static void client_write_output(struct client *client)
(unsigned long)client_max_output_buffer_size);
/* cause client to close */
client->expired = 1;
- do {
- struct sllnode *prev = buf;
- buf = buf->next;
- free(prev);
- } while (buf);
- client->deferred_send = NULL;
- client->deferred_bytes = 0;
} else {
while (buf->next)
buf = buf->next;