summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_aix_send_file.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/nxt_aix_send_file.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/nxt_aix_send_file.c b/src/nxt_aix_send_file.c
index b7cb3b28..6462efd5 100644
--- a/src/nxt_aix_send_file.c
+++ b/src/nxt_aix_send_file.c
@@ -32,7 +32,7 @@ nxt_aix_event_conn_io_send_file(nxt_event_conn_t *c, nxt_buf_t *b, size_t limit)
sb.size = 0;
sb.limit = limit;
- nhd = nxt_sendbuf_mem_coalesce(&sb);
+ nhd = nxt_sendbuf_mem_coalesce(c->socket.task, &sb);
if (nhd == 0 && sb.sync) {
return 0;
@@ -53,7 +53,7 @@ nxt_aix_event_conn_io_send_file(nxt_event_conn_t *c, nxt_buf_t *b, size_t limit)
sb.iobuf = &tr;
sb.nmax = 1;
- ntr = nxt_sendbuf_mem_coalesce(&sb);
+ ntr = nxt_sendbuf_mem_coalesce(c->socket.task, &sb);
nxt_memzero(&sfp, sizeof(struct sf_parms));
@@ -71,17 +71,16 @@ nxt_aix_event_conn_io_send_file(nxt_event_conn_t *c, nxt_buf_t *b, size_t limit)
sfp.trailer_length = tr.iov_len;
}
- nxt_log_debug(c->socket.log, "send_file(%d) fd:%FD @%O:%O hd:%ui tr:%ui",
- c->socket.fd, fb->file->fd, fb->file_pos, file_size,
- nhd, ntr);
+ nxt_debug(c->socket.task, "send_file(%d) fd:%FD @%O:%O hd:%ui tr:%ui",
+ c->socket.fd, fb->file->fd, fb->file_pos, file_size, nhd, ntr);
n = send_file(&c->socket.fd, &sfp, 0);
err = (n == -1) ? nxt_errno : 0;
sent = sfp.bytes_sent;
- nxt_log_debug(c->socket.log, "send_file(%d): %d sent:%O",
- c->socket.fd, n, sent);
+ nxt_debug(c->socket.task, "send_file(%d): %d sent:%O",
+ c->socket.fd, n, sent);
/*
* -1 an error has occurred, errno contains the error code;
@@ -102,16 +101,15 @@ nxt_aix_event_conn_io_send_file(nxt_event_conn_t *c, nxt_buf_t *b, size_t limit)
default:
c->socket.error = err;
- nxt_log_error(nxt_socket_error_level(err, c->socket.log_error),
- c->socket.log, "send_file(%d) failed %E \"%FN\" "
- "fd:%FD @%O:%O hd:%ui tr:%ui", c->socket.fd, err,
- fb->file->name, fb->file->fd, fb->file_pos,
- file_size, nhd, ntr);
+ nxt_log(c->socket.task, nxt_socket_error_level(err),
+ "send_file(%d) failed %E \"%FN\" fd:%FD @%O:%O hd:%ui tr:%ui",
+ c->socket.fd, err, fb->file->name, fb->file->fd, fb->file_pos,
+ file_size, nhd, ntr);
return NXT_ERROR;
}
- nxt_log_debug(c->socket.log, "sendfile() %E", err);
+ nxt_debug(c->socket.task, "sendfile() %E", err);
return sent;
}