mirror of
https://gitlab.xiph.org/xiph/icecast-common.git
synced 2025-01-03 14:56:36 -05:00
Add error == 0 to recoverable error numbers. Patch from Ricardo Galli.
Minor style fixes. svn path=/trunk/net/; revision=3174
This commit is contained in:
parent
08be376dd4
commit
45c5df41f9
@ -118,7 +118,7 @@ int sock_error(void)
|
||||
*/
|
||||
int sock_recoverable(int error)
|
||||
{
|
||||
return (error == EAGAIN || error == EINTR || error == EINPROGRESS || error == EWOULDBLOCK);
|
||||
return (error == 0 || error == EAGAIN || error == EINTR || error == EINPROGRESS || error == EWOULDBLOCK);
|
||||
}
|
||||
|
||||
/* sock_valid_socket
|
||||
@ -449,12 +449,13 @@ sock_t sock_get_server_socket(const int port, char *sinterface)
|
||||
sa_len = sizeof (struct sockaddr_in6);
|
||||
((struct sockaddr_in6*)&sa)->sin6_family = AF_INET6;
|
||||
((struct sockaddr_in6*)&sa)->sin6_port = htons(port);
|
||||
} else
|
||||
} else {
|
||||
return SOCK_ERROR;
|
||||
}
|
||||
#else
|
||||
if (!inet_aton(ip, &sa.sin_addr))
|
||||
if (!inet_aton(ip, &sa.sin_addr)) {
|
||||
return SOCK_ERROR;
|
||||
else {
|
||||
} else {
|
||||
sa.sin_family = AF_INET;
|
||||
sa.sin_port = htons(port);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user