reqs: Fix CID 1130969 (part 2) - unchecked return value from library.
Check the return value of socket_blocking (fcntl) at the
end of relay_connection().
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit e07c363df2
)
This commit is contained in:
parent
e467744134
commit
b86ecaa11b
@ -1220,7 +1220,14 @@ static void relay_connection (struct conn_s *connptr)
|
|||||||
/*
|
/*
|
||||||
* Try to send any remaining data to the server if we can.
|
* Try to send any remaining data to the server if we can.
|
||||||
*/
|
*/
|
||||||
socket_blocking (connptr->server_fd);
|
ret = socket_blocking (connptr->server_fd);
|
||||||
|
if (ret != 0) {
|
||||||
|
log_message(LOG_ERR,
|
||||||
|
"Failed to set server socket to blocking: %s",
|
||||||
|
strerror(errno));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
while (buffer_size (connptr->cbuffer) > 0) {
|
while (buffer_size (connptr->cbuffer) > 0) {
|
||||||
if (write_buffer (connptr->server_fd, connptr->cbuffer) < 0)
|
if (write_buffer (connptr->server_fd, connptr->cbuffer) < 0)
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user