summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_sendbuf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nxt_sendbuf.c')
-rw-r--r--src/nxt_sendbuf.c63
1 files changed, 1 insertions, 62 deletions
diff --git a/src/nxt_sendbuf.c b/src/nxt_sendbuf.c
index 704236ca..ed6fca36 100644
--- a/src/nxt_sendbuf.c
+++ b/src/nxt_sendbuf.c
@@ -376,68 +376,7 @@ nxt_sendbuf_update(nxt_buf_t *b, size_t sent)
nxt_buf_t *
-nxt_sendbuf_completion(nxt_task_t *task, nxt_work_queue_t *wq, nxt_buf_t *b,
- size_t sent, nxt_bool_t mmap_mode)
-{
- size_t size;
-
- while (b != NULL) {
-
- nxt_prefetch(b->next);
-
- if (!nxt_buf_is_sync(b)) {
-
- size = nxt_buf_used_size(b);
-
- if (size != 0) {
-
- if (sent == 0) {
- break;
- }
-
- if (nxt_buf_is_port_mmap(b) && mmap_mode) {
- /*
- * buffer has been sent to other side which is now
- * responsible for shared memory bucket release
- */
- b->is_port_mmap_sent = 1;
- }
-
- if (sent < size) {
-
- if (nxt_buf_is_mem(b)) {
- b->mem.pos += sent;
- }
-
- if (nxt_buf_is_file(b)) {
- b->file_pos += sent;
- }
-
- break;
- }
-
- /* b->mem.free is NULL in file-only buffer. */
- b->mem.pos = b->mem.free;
-
- if (nxt_buf_is_file(b)) {
- b->file_pos = b->file_end;
- }
-
- sent -= size;
- }
- }
-
- nxt_work_queue_add(wq, b->completion_handler, task, b, b->parent);
-
- b = b->next;
- }
-
- return b;
-}
-
-
-nxt_buf_t *
-nxt_sendbuf_completion0(nxt_task_t *task, nxt_work_queue_t *wq, nxt_buf_t *b)
+nxt_sendbuf_completion(nxt_task_t *task, nxt_work_queue_t *wq, nxt_buf_t *b)
{
while (b != NULL) {