1
1

Don't complain about unsupported protocols. Needs to be made better,

but this will quit the whining from platforms where the kernel doesn't
have IPv6 support.

This commit was SVN r14676.
Этот коммит содержится в:
Brian Barrett 2007-05-16 20:11:47 +00:00
родитель 542937ee2f
Коммит 7708c4f887

Просмотреть файл

@ -485,9 +485,11 @@ static int mca_btl_tcp_component_create_listen(uint16_t af_family)
/* create a listen socket for incoming connections */
sd = socket(af_family, SOCK_STREAM, 0);
if(sd < 0) {
BTL_ERROR(("socket() failed: %s (%d)",
strerror(opal_socket_errno), opal_socket_errno));
return OMPI_ERROR;
if (EAFNOSUPPORT != opal_socket_errno) {
BTL_ERROR(("socket() failed: %s (%d)",
strerror(opal_socket_errno), opal_socket_errno));
}
return OMPI_ERR_IN_ERRNO;
}
/* we now have a socket. Assign it to the real mca_btl_tcp_component */
@ -717,6 +719,7 @@ mca_btl_base_module_t** mca_btl_tcp_component_init(int *num_btl_modules,
bool enable_progress_threads,
bool enable_mpi_threads)
{
int ret;
mca_btl_base_module_t **btls;
*num_btl_modules = 0;
@ -757,9 +760,11 @@ mca_btl_base_module_t** mca_btl_tcp_component_init(int *num_btl_modules,
return 0;
}
#if OPAL_WANT_IPV6
if(mca_btl_tcp_component_create_listen(AF_INET6) != OMPI_SUCCESS) {
opal_output (0, "mca_btl_tcp_component: IPv6 listening socket failed\n");
return 0;
if((ret = mca_btl_tcp_component_create_listen(AF_INET6)) != OMPI_SUCCESS) {
if (!(OMPI_ERR_IN_ERRNO == ret && EAFNOSUPPORT == opal_socket_errno)) {
opal_output (0, "mca_btl_tcp_component: IPv6 listening socket failed\n");
return 0;
}
}
#endif