Replace gwbuf_clone_all with gwbuf_clone

gwbuf_clone cloned only the first buffer of a chain of buffers,
which never can be the desired outcome, while gwbuf_clone_all
cloned all buffers.

Now, gwbuf_clone behaves the way gwbuf_clone_all used to behave
and gwbuf_clone_all has been removed.
This commit is contained in:
Johan Wikman
2016-12-19 10:20:16 +02:00
parent 875766cf62
commit 6e6a3e4626
5 changed files with 31 additions and 21 deletions

View File

@ -434,7 +434,7 @@ test1()
ss_info_dassert(append == head, "gwbuf_append should return head");
ss_info_dassert(append->next == tail, "After append tail should be in the next pointer of head");
ss_info_dassert(append->tail == tail, "After append tail should be in the tail pointer of head");
GWBUF* all_clones = gwbuf_clone_all(head);
GWBUF* all_clones = gwbuf_clone(head);
ss_info_dassert(all_clones && all_clones->next, "Cloning all should work");
ss_info_dassert(GWBUF_LENGTH(all_clones) == headsize, "First buffer should be 10 bytes");
ss_info_dassert(GWBUF_LENGTH(all_clones->next) == tailsize, "Second buffer should be 20 bytes");