Rename MYSQL_GET_PACKET_LEN to MYSQL_GET_PAYLOAD_LEN

The function returns the length of the payload, not the length of
the entire packet.
This commit is contained in:
Johan Wikman
2017-01-12 14:24:14 +02:00
parent 77aff88ed7
commit 2fa12f796b
12 changed files with 33 additions and 33 deletions

View File

@ -406,7 +406,7 @@ bool is_error_response(GWBUF *buffer)
void log_error_response(DCB *dcb, GWBUF *buffer)
{
uint8_t *data = (uint8_t*)GWBUF_DATA(buffer);
size_t len = MYSQL_GET_PACKET_LEN(data);
size_t len = MYSQL_GET_PAYLOAD_LEN(data);
uint16_t errcode = MYSQL_GET_ERRCODE(data);
char bufstr[len];
memcpy(bufstr, data + 7, len - 3);