Core: fixed errno clobbering in ngx_sendmsg().
This was broken by 2dfd313f22f2.
This commit is contained in:
parent
6750340391
commit
f59b487a69
1 changed files with 9 additions and 9 deletions
|
@ -398,15 +398,6 @@ eintr:
|
|||
|
||||
n = sendmsg(c->fd, msg, flags);
|
||||
|
||||
#if (NGX_DEBUG)
|
||||
for (i = 0, size = 0; i < (size_t) msg->msg_iovlen; i++) {
|
||||
size += msg->msg_iov[i].iov_len;
|
||||
}
|
||||
|
||||
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0,
|
||||
"sendmsg: %z of %uz", n, size);
|
||||
#endif
|
||||
|
||||
if (n == -1) {
|
||||
err = ngx_errno;
|
||||
|
||||
|
@ -428,5 +419,14 @@ eintr:
|
|||
}
|
||||
}
|
||||
|
||||
#if (NGX_DEBUG)
|
||||
for (i = 0, size = 0; i < (size_t) msg->msg_iovlen; i++) {
|
||||
size += msg->msg_iov[i].iov_len;
|
||||
}
|
||||
|
||||
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0,
|
||||
"sendmsg: %z of %uz", n, size);
|
||||
#endif
|
||||
|
||||
return n;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue