summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_hpux_sendfile.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2017-02-22 15:09:59 +0300
committerIgor Sysoev <igor@sysoev.ru>2017-02-22 15:09:59 +0300
commit029942f4eb7196c2cff0d0e26bc6ff274138f7d8 (patch)
treef4686c4d7b9cd574fe94c6f4918479a580fecf75 /src/nxt_hpux_sendfile.c
parent059a8642898a6bd4b47d13a1c1d599cd44af7e1c (diff)
downloadunit-029942f4eb7196c2cff0d0e26bc6ff274138f7d8.tar.gz
unit-029942f4eb7196c2cff0d0e26bc6ff274138f7d8.tar.bz2
I/O operations refactoring.
Diffstat (limited to 'src/nxt_hpux_sendfile.c')
-rw-r--r--src/nxt_hpux_sendfile.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/nxt_hpux_sendfile.c b/src/nxt_hpux_sendfile.c
index a105b684..3c42c559 100644
--- a/src/nxt_hpux_sendfile.c
+++ b/src/nxt_hpux_sendfile.c
@@ -48,7 +48,7 @@ nxt_hpux_event_conn_io_sendfile(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;
@@ -69,7 +69,7 @@ nxt_hpux_event_conn_io_sendfile(nxt_event_conn_t *c, nxt_buf_t *b, size_t limit)
sb.iobuf = &iov[1];
sb.nmax = 1;
- ntr = nxt_sendbuf_mem_coalesce(&sb);
+ ntr = nxt_sendbuf_mem_coalesce(c->socket.task, &sb);
/*
* Disposal of surplus kernel operations
@@ -93,7 +93,7 @@ nxt_hpux_event_conn_io_sendfile(nxt_event_conn_t *c, nxt_buf_t *b, size_t limit)
hdtrl = iov;
}
- nxt_log_debug(c->socket.log, "sendfile(%d, %FD, @%O, %uz) hd:%ui tr:%ui",
+ nxt_debug(c->socket.task, "sendfile(%d, %FD, @%O, %uz) hd:%ui tr:%ui",
c->socket.fd, fb->file->fd, fb->file_pos, file_size,
nhd, ntr);
@@ -102,7 +102,7 @@ nxt_hpux_event_conn_io_sendfile(nxt_event_conn_t *c, nxt_buf_t *b, size_t limit)
err = (n == -1) ? nxt_errno : 0;
- nxt_log_debug(c->socket.log, "sendfile(): %uz", n);
+ nxt_debug(c->socket.task, "sendfile(): %uz", n);
if (n == -1) {
switch (err) {
@@ -116,16 +116,15 @@ nxt_hpux_event_conn_io_sendfile(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, "sendfile(%d, %FD, @%O, %uz) failed "
- "%E \"%FN\" hd:%ui tr:%ui", c->socket.fd,
- fb->file->fd, fb->file_pos, file_size,
- err, &fb->file->name, nhd, ntr);
+ nxt_log(c->socket.task, nxt_socket_error_level(err),
+ "sendfile(%d, %FD, @%O, %uz) failed \"%FN\" hd:%ui tr:%ui",
+ c->socket.fd, fb->file_pos, file_size, &fb->file->name,
+ nhd, ntr);
return NXT_ERROR;
}
- nxt_log_debug(c->socket.log, "sendfile() %E", err);
+ nxt_debug(c->socket.task, "sendfile() %E", err);
return 0;
}