From f2455467ad616f1d7b210803bc653e774253c6cd Mon Sep 17 00:00:00 2001 From: Massimiliano Pinto Date: Wed, 26 Jun 2013 23:29:26 +0200 Subject: [PATCH] Added same size for buffer in read and write to backend socket --- modules/protocol/mysql_backend.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/protocol/mysql_backend.c b/modules/protocol/mysql_backend.c index bcd4a157a..275386859 100644 --- a/modules/protocol/mysql_backend.c +++ b/modules/protocol/mysql_backend.c @@ -423,7 +423,7 @@ int gw_mysql_connect(char *host, int port, char *dbname, char *user, uint8_t *pa memset(&buffer, '\0', sizeof(buffer)); - bytes = 16384; + bytes = SMALL_CHUNK; rv = read(so, buffer, bytes); @@ -717,12 +717,11 @@ int gw_mysql_connect(char *host, int port, char *dbname, char *user, uint8_t *pa fprintf(stderr, "CONNECT Error in send auth\n"); } - bytes = 4096; + bytes = SMALL_CHUNK; memset(buffer, '\0', sizeof (buffer)); - rv = read(so, buffer, 4096); - + rv = read(so, buffer, SMALL_CHUNK); if (rv == -1) { fprintf(stderr, "CONNCET Error in recv OK for auth\n");