Support for multipacket statements
Remove double free in cloned DCB's
This commit is contained in:
@ -94,9 +94,9 @@ typedef struct gwbuf {
|
||||
#define GWBUF_EMPTY(b) ((b)->start == (b)->end)
|
||||
|
||||
/*< Consume a number of bytes in the buffer */
|
||||
#define GWBUF_CONSUME(b, bytes) (b)->start += bytes
|
||||
#define GWBUF_CONSUME(b, bytes) (b)->start += (bytes)
|
||||
|
||||
#define GWBUF_RTRIM(b, bytes) (b)->end -= bytes
|
||||
#define GWBUF_RTRIM(b, bytes) (b)->end -= (bytes)
|
||||
|
||||
#define GWBUF_TYPE(b) (b)->gwbuf_type
|
||||
/*<
|
||||
@ -107,6 +107,7 @@ extern void gwbuf_free(GWBUF *buf);
|
||||
extern GWBUF *gwbuf_clone(GWBUF *buf);
|
||||
extern GWBUF *gwbuf_append(GWBUF *head, GWBUF *tail);
|
||||
extern GWBUF *gwbuf_consume(GWBUF *head, unsigned int length);
|
||||
extern GWBUF *gwbuf_trim(GWBUF *head, unsigned int length);
|
||||
extern unsigned int gwbuf_length(GWBUF *head);
|
||||
extern GWBUF *gwbuf_clone_portion(GWBUF *head, size_t offset, size_t len);
|
||||
extern GWBUF *gwbuf_clone_transform(GWBUF *head, gwbuf_type_t type);
|
||||
|
Reference in New Issue
Block a user