server: Avoid some compiler warnings when EWOULDBLOCK == EAGAIN.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
70dd64cf97
commit
438dae524d
|
@ -241,7 +241,7 @@ void write_reply( struct thread *thread )
|
||||||
}
|
}
|
||||||
if (errno == EPIPE)
|
if (errno == EPIPE)
|
||||||
kill_thread( thread, 0 ); /* normal death */
|
kill_thread( thread, 0 ); /* normal death */
|
||||||
else if (errno != EWOULDBLOCK && errno != EAGAIN)
|
else if (errno != EWOULDBLOCK && (EWOULDBLOCK == EAGAIN || errno != EAGAIN))
|
||||||
fatal_protocol_error( thread, "reply write: %s\n", strerror( errno ));
|
fatal_protocol_error( thread, "reply write: %s\n", strerror( errno ));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -368,7 +368,7 @@ error:
|
||||||
kill_thread( thread, 0 );
|
kill_thread( thread, 0 );
|
||||||
else if (ret > 0)
|
else if (ret > 0)
|
||||||
fatal_protocol_error( thread, "partial read %d\n", ret );
|
fatal_protocol_error( thread, "partial read %d\n", ret );
|
||||||
else if (errno != EWOULDBLOCK && errno != EAGAIN)
|
else if (errno != EWOULDBLOCK && (EWOULDBLOCK == EAGAIN || errno != EAGAIN))
|
||||||
fatal_protocol_error( thread, "read: %s\n", strerror( errno ));
|
fatal_protocol_error( thread, "read: %s\n", strerror( errno ));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -449,7 +449,7 @@ int receive_fd( struct process *process )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (errno != EWOULDBLOCK && errno != EAGAIN)
|
if (errno != EWOULDBLOCK && (EWOULDBLOCK == EAGAIN || errno != EAGAIN))
|
||||||
{
|
{
|
||||||
fprintf( stderr, "Protocol error: process %04x: ", process->id );
|
fprintf( stderr, "Protocol error: process %04x: ", process->id );
|
||||||
perror( "recvmsg" );
|
perror( "recvmsg" );
|
||||||
|
|
|
@ -1075,7 +1075,7 @@ static void ifchange_poll_event( struct fd *fd, int event )
|
||||||
r = recv( get_unix_fd(fd), buffer, sizeof(buffer), MSG_DONTWAIT );
|
r = recv( get_unix_fd(fd), buffer, sizeof(buffer), MSG_DONTWAIT );
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
{
|
{
|
||||||
if (errno == EWOULDBLOCK || errno == EAGAIN)
|
if (errno == EWOULDBLOCK || (EWOULDBLOCK != EAGAIN && errno == EAGAIN))
|
||||||
return; /* retry when poll() says the socket is ready */
|
return; /* retry when poll() says the socket is ready */
|
||||||
status = sock_get_ntstatus( errno );
|
status = sock_get_ntstatus( errno );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue