Added same size for buffer in read and write to backend socket

This commit is contained in:
Massimiliano Pinto 2013-06-26 23:29:26 +02:00
parent e3b5adad4a
commit f2455467ad

View File

@ -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");