gwbuf_append's return value wasn't read in gw_read_client_event

This commit is contained in:
VilhoRaatikka 2014-09-12 18:10:42 +03:00
parent e618adb930
commit 5a28a73fcb
2 changed files with 3 additions and 2 deletions

View File

@ -492,6 +492,7 @@ static int gw_read_backend_event(DCB *dcb) {
dcb->dcb_readqueue = NULL;
}
}
/** This may be either short prefix of a packet, or the tail of it. */
else
{
if (nbytes_read < 5)

View File

@ -578,8 +578,8 @@ int gw_read_client_event(
if (nbytes_read < 3 || nbytes_read < MYSQL_GET_PACKET_LEN(data)+4)
{
gwbuf_append(dcb->dcb_readqueue, read_buffer);
rc = 0;
dcb->dcb_readqueue = gwbuf_append(dcb->dcb_readqueue, read_buffer);
rc = 0;
goto return_rc;
}
}