aboutsummaryrefslogtreecommitdiffstats
path: root/src/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.c')
-rw-r--r--src/client.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/client.c b/src/client.c
index 0585b0405..9c9ec067b 100644
--- a/src/client.c
+++ b/src/client.c
@@ -40,7 +40,6 @@
#define GREETING "OK MPD " PROTOCOL_VERSION "\n"
-#define CLIENT_MAX_BUFFER_LENGTH (40960)
#define CLIENT_LIST_MODE_BEGIN "command_list_begin"
#define CLIENT_LIST_OK_MODE_BEGIN "command_list_ok_begin"
#define CLIENT_LIST_MODE_END "command_list_end"
@@ -69,7 +68,7 @@ static struct strnode *list_cache_tail;
struct client {
struct list_head siblings;
- char buffer[CLIENT_MAX_BUFFER_LENGTH];
+ char buffer[4096];
size_t bufferLength;
size_t bufferPos;
@@ -509,7 +508,7 @@ static int client_read(struct client *client)
bytesRead = read(client->fd,
client->buffer + client->bufferLength,
- CLIENT_MAX_BUFFER_LENGTH - client->bufferLength);
+ sizeof(client->buffer) - client->bufferLength);
if (bytesRead > 0)
return client_input_received(client, bytesRead);