diff options
Diffstat (limited to 'uring.c')
-rw-r--r-- | uring.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -162,7 +162,7 @@ uring_task_set_buf(struct uring_task *task, struct uring_task_buf *tbuf) if (tbuf) { /* iov_len and msg_namelen are set at send/receive time */ tbuf->iov.iov_base = tbuf->buf; - tbuf->msg.msg_name = &task->addr.storage; + tbuf->msg.msg_name = &task->saddr.storage; tbuf->msg.msg_iov = &tbuf->iov; tbuf->msg.msg_iovlen = 1; tbuf->msg.msg_control = NULL; @@ -470,7 +470,7 @@ uring_tbuf_recvmsg(struct cfg *cfg, struct uring_task *task, callback_t callback task->tbuf->done = 0; task->tbuf->len = 0; task->tbuf->iov.iov_len = sizeof(task->tbuf->buf); - task->tbuf->msg.msg_namelen = task->addr.addrlen; + task->tbuf->msg.msg_namelen = task->saddr.addrlen; task->callback = callback; io_uring_prep_recvmsg(sqe, task->fd, &task->tbuf->msg, 0); io_uring_sqe_set_data(sqe, task); @@ -492,14 +492,14 @@ uring_tbuf_sendmsg(struct cfg *cfg, struct uring_task *task, callback_t callback sqe = get_sqe(cfg, task); task->tbuf->done = 0; task->tbuf->iov.iov_len = task->tbuf->len; - task->tbuf->msg.msg_namelen = task->addr.addrlen; + task->tbuf->msg.msg_namelen = task->saddr.addrlen; task->callback = callback; io_uring_prep_sendmsg(sqe, task->fd, &task->tbuf->msg, 0); io_uring_sqe_set_data(sqe, task); } void -uring_connect(struct cfg *cfg, struct uring_task *task, struct sockaddr_in46 *addr, callback_t callback) +uring_connect(struct cfg *cfg, struct uring_task *task, struct saddr *saddr, callback_t callback) { struct io_uring_sqe *sqe; @@ -513,12 +513,12 @@ uring_connect(struct cfg *cfg, struct uring_task *task, struct sockaddr_in46 *ad sqe = get_sqe(cfg, task); task->callback = callback; - io_uring_prep_connect(sqe, task->fd, (struct sockaddr *)&addr->storage, addr->addrlen); + io_uring_prep_connect(sqe, task->fd, (struct sockaddr *)&saddr->storage, saddr->addrlen); io_uring_sqe_set_data(sqe, task); } void -uring_accept(struct cfg *cfg, struct uring_task *task, struct sockaddr_in46 *addr, callback_t callback) +uring_accept(struct cfg *cfg, struct uring_task *task, struct saddr *saddr, callback_t callback) { struct io_uring_sqe *sqe; @@ -531,9 +531,9 @@ uring_accept(struct cfg *cfg, struct uring_task *task, struct sockaddr_in46 *add task->name, task, task->fd, task->refcount); sqe = get_sqe(cfg, task); - addr->addrlen = sizeof(addr->storage); + saddr->addrlen = sizeof(saddr->storage); task->callback = callback; - io_uring_prep_accept(sqe, task->fd, (struct sockaddr *)&addr->storage, &addr->addrlen, SOCK_CLOEXEC); + io_uring_prep_accept(sqe, task->fd, (struct sockaddr *)&saddr->storage, &saddr->addrlen, SOCK_CLOEXEC); io_uring_sqe_set_data(sqe, task); } |