Browse Source

[core] chunkqueue_compact_mem() must upd cq->last

master
Glenn Strauss 1 month ago
parent
commit
d2d5f27f80
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      src/chunk.c

+ 2
- 0
src/chunk.c View File

@@ -773,6 +773,7 @@ void chunkqueue_compact_mem(chunkqueue *cq, size_t clen) {
b = chunkqueue_prepend_buffer_open_sz(cq, clen + 8192);
buffer_append_string_len(b, c->mem->ptr + c->offset, len);
cq->first->next = c->next;
if (NULL == c->next) cq->last = cq->first;
chunk_release(c);
c = cq->first;
}
@@ -781,6 +782,7 @@ void chunkqueue_compact_mem(chunkqueue *cq, size_t clen) {
if (len > clen) len = clen;
buffer_append_string_len(b, c->mem->ptr + c->offset, len);
fc->next = c->next;
if (NULL == c->next) cq->last = fc;
chunk_release(c);
}
/* chunkqueue_prepend_buffer_commit() is not called here;


Loading…
Cancel
Save