Fiddle around with spaces.
This commit is contained in:
@ -565,7 +565,7 @@ GWBUF* modutil_get_complete_packets(GWBUF **p_readbuf)
|
|||||||
/** Give up if the parameter is not a pointer to a pointer or
|
/** Give up if the parameter is not a pointer to a pointer or
|
||||||
* the total buffer length is less than the 3 bytes needed to
|
* the total buffer length is less than the 3 bytes needed to
|
||||||
* hold a packet length. */
|
* hold a packet length. */
|
||||||
if(p_readbuf == NULL || (*p_readbuf) == NULL ||
|
if (p_readbuf == NULL || (*p_readbuf) == NULL ||
|
||||||
(blen = gwbuf_length(*p_readbuf)) < 3)
|
(blen = gwbuf_length(*p_readbuf)) < 3)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -576,7 +576,7 @@ GWBUF* modutil_get_complete_packets(GWBUF **p_readbuf)
|
|||||||
|
|
||||||
/** We need at least 3 bytes of the packet header to know how long the next
|
/** We need at least 3 bytes of the packet header to know how long the next
|
||||||
* packet is going to be, if we are going to cycle round again. */
|
* packet is going to be, if we are going to cycle round again. */
|
||||||
while(total + (len = gw_mysql_get_byte3(ptr) + 4) < (blen - 3))
|
while (total + (len = gw_mysql_get_byte3(ptr) + 4) < (blen - 3))
|
||||||
{
|
{
|
||||||
ptr += len;
|
ptr += len;
|
||||||
total += len;
|
total += len;
|
||||||
@ -589,7 +589,7 @@ GWBUF* modutil_get_complete_packets(GWBUF **p_readbuf)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
/** Full packets only, return original and null the passed buffer */
|
/** Full packets only, return original and null the passed buffer */
|
||||||
if(total == blen)
|
if (total == blen)
|
||||||
{
|
{
|
||||||
GWBUF *packet = *p_readbuf;
|
GWBUF *packet = *p_readbuf;
|
||||||
*p_readbuf = NULL;
|
*p_readbuf = NULL;
|
||||||
@ -597,12 +597,12 @@ GWBUF* modutil_get_complete_packets(GWBUF **p_readbuf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** The next packet is a partial, split into complete and partial packets */
|
/** The next packet is a partial, split into complete and partial packets */
|
||||||
if((complete_part = gwbuf_clone_portion(*p_readbuf,0,total)) == NULL)
|
if ((complete_part = gwbuf_clone_portion(*p_readbuf, 0, total)) == NULL)
|
||||||
{
|
{
|
||||||
MXS_ERROR("Failed to partially clone buffer while extracting complete packets.");
|
MXS_ERROR("Failed to partially clone buffer while extracting complete packets.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
*p_readbuf = gwbuf_consume(*p_readbuf,total);
|
*p_readbuf = gwbuf_consume(*p_readbuf, total);
|
||||||
return complete_part;
|
return complete_part;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user