1
1
Этот коммит содержится в:
George Bosilca 2014-12-16 16:07:42 -05:00
родитель 146ab96e29
Коммит 830df07202
2 изменённых файлов: 13 добавлений и 14 удалений

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

@ -527,10 +527,8 @@ void mca_btl_tcp_endpoint_close(mca_btl_base_endpoint_t* btl_endpoint)
frag = (mca_btl_tcp_frag_t*)opal_list_remove_first(&btl_endpoint->endpoint_frags); frag = (mca_btl_tcp_frag_t*)opal_list_remove_first(&btl_endpoint->endpoint_frags);
} }
} else {
btl_endpoint->endpoint_state = MCA_BTL_TCP_CLOSED;
} }
btl_endpoint->endpoint_state = MCA_BTL_TCP_CLOSED;
} }
/* /*
@ -542,6 +540,7 @@ void mca_btl_tcp_endpoint_close(mca_btl_base_endpoint_t* btl_endpoint)
static void mca_btl_tcp_endpoint_connected(mca_btl_base_endpoint_t* btl_endpoint) static void mca_btl_tcp_endpoint_connected(mca_btl_base_endpoint_t* btl_endpoint)
{ {
/* setup socket options */ /* setup socket options */
assert( MCA_BTL_TCP_CONNECTED != btl_endpoint->endpoint_state );
btl_endpoint->endpoint_state = MCA_BTL_TCP_CONNECTED; btl_endpoint->endpoint_state = MCA_BTL_TCP_CONNECTED;
btl_endpoint->endpoint_retries = 0; btl_endpoint->endpoint_retries = 0;
MCA_BTL_TCP_ENDPOINT_DUMP(1, btl_endpoint, true, "READY [endpoint_connected]"); MCA_BTL_TCP_ENDPOINT_DUMP(1, btl_endpoint, true, "READY [endpoint_connected]");

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

@ -200,18 +200,18 @@ bool mca_btl_tcp_frag_recv(mca_btl_tcp_frag_t* frag, int sd)
cnt = -1; cnt = -1;
while( cnt < 0 ) { while( cnt < 0 ) {
cnt = readv(sd, frag->iov_ptr, num_vecs); cnt = readv(sd, frag->iov_ptr, num_vecs);
if( 0 < cnt ) goto advance_iov_position; if( 0 < cnt ) goto advance_iov_position;
if( cnt == 0 ) { if( cnt == 0 ) {
btl_endpoint->endpoint_state = MCA_BTL_TCP_FAILED; btl_endpoint->endpoint_state = MCA_BTL_TCP_FAILED;
mca_btl_tcp_endpoint_close(btl_endpoint); mca_btl_tcp_endpoint_close(btl_endpoint);
return false; return false;
} }
switch(opal_socket_errno) { switch(opal_socket_errno) {
case EINTR: case EINTR:
continue; continue;
case EWOULDBLOCK: case EWOULDBLOCK:
return false; return false;
case EFAULT: case EFAULT:
BTL_ERROR(("mca_btl_tcp_frag_recv: readv error (%p, %lu)\n\t%s(%lu)\n", BTL_ERROR(("mca_btl_tcp_frag_recv: readv error (%p, %lu)\n\t%s(%lu)\n",
frag->iov_ptr[0].iov_base, (unsigned long) frag->iov_ptr[0].iov_len, frag->iov_ptr[0].iov_base, (unsigned long) frag->iov_ptr[0].iov_len,
strerror(opal_socket_errno), (unsigned long) frag->iov_cnt)); strerror(opal_socket_errno), (unsigned long) frag->iov_cnt));