Minor coding style and intentation fixes.
This commit was SVN r24764.
Этот коммит содержится в:
родитель
610421a0da
Коммит
20339a7900
@ -140,14 +140,16 @@ bool mca_oob_tcp_msg_send_handler(mca_oob_tcp_msg_t* msg, struct mca_oob_tcp_pee
|
|||||||
while(1) {
|
while(1) {
|
||||||
rc = writev(peer->peer_sd, msg->msg_rwptr, msg->msg_rwnum);
|
rc = writev(peer->peer_sd, msg->msg_rwptr, msg->msg_rwnum);
|
||||||
if(rc < 0) {
|
if(rc < 0) {
|
||||||
if(opal_socket_errno == EINTR)
|
if(opal_socket_errno == EINTR) {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
/* In windows, many of the socket functions return an EWOULDBLOCK instead of \
|
/* In windows, many of the socket functions return an EWOULDBLOCK instead of \
|
||||||
things like EAGAIN, EINPROGRESS, etc. It has been verified that this will \
|
things like EAGAIN, EINPROGRESS, etc. It has been verified that this will \
|
||||||
not conflict with other error codes that are returned by these functions \
|
not conflict with other error codes that are returned by these functions \
|
||||||
under UNIX/Linux environments */
|
under UNIX/Linux environments */
|
||||||
else if (opal_socket_errno == EAGAIN || opal_socket_errno == EWOULDBLOCK)
|
else if (opal_socket_errno == EAGAIN || opal_socket_errno == EWOULDBLOCK) {
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
opal_output(0, "%s->%s mca_oob_tcp_msg_send_handler: writev failed: %s (%d) [sd = %d]",
|
opal_output(0, "%s->%s mca_oob_tcp_msg_send_handler: writev failed: %s (%d) [sd = %d]",
|
||||||
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
|
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
|
||||||
@ -248,24 +250,26 @@ static bool mca_oob_tcp_msg_recv(mca_oob_tcp_msg_t* msg, mca_oob_tcp_peer_t* pee
|
|||||||
while(msg->msg_rwnum) {
|
while(msg->msg_rwnum) {
|
||||||
rc = readv(peer->peer_sd, msg->msg_rwptr, msg->msg_rwnum);
|
rc = readv(peer->peer_sd, msg->msg_rwptr, msg->msg_rwnum);
|
||||||
if(rc < 0) {
|
if(rc < 0) {
|
||||||
if(opal_socket_errno == EINTR)
|
if(opal_socket_errno == EINTR) {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
/* In windows, many of the socket functions return an EWOULDBLOCK instead of \
|
/* In windows, many of the socket functions return an EWOULDBLOCK instead of \
|
||||||
things like EAGAIN, EINPROGRESS, etc. It has been verified that this will \
|
things like EAGAIN, EINPROGRESS, etc. It has been verified that this will \
|
||||||
not conflict with other error codes that are returned by these functions \
|
not conflict with other error codes that are returned by these functions \
|
||||||
under UNIX/Linux environments */
|
under UNIX/Linux environments */
|
||||||
else if (opal_socket_errno == EAGAIN || opal_socket_errno == EWOULDBLOCK)
|
else if (opal_socket_errno == EAGAIN || opal_socket_errno == EWOULDBLOCK) {
|
||||||
return false;
|
return false;
|
||||||
opal_output(0, "%s-%s mca_oob_tcp_msg_recv: readv failed: %s (%d)",
|
}
|
||||||
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
|
opal_output(0, "%s-%s mca_oob_tcp_msg_recv: readv failed: %s (%d)",
|
||||||
ORTE_NAME_PRINT(&(peer->peer_name)),
|
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
|
||||||
strerror(opal_socket_errno),
|
ORTE_NAME_PRINT(&(peer->peer_name)),
|
||||||
opal_socket_errno);
|
strerror(opal_socket_errno),
|
||||||
mca_oob_tcp_peer_close(peer);
|
opal_socket_errno);
|
||||||
|
mca_oob_tcp_peer_close(peer);
|
||||||
if (NULL != mca_oob_tcp.oob_exception_callback) {
|
if (NULL != mca_oob_tcp.oob_exception_callback) {
|
||||||
mca_oob_tcp.oob_exception_callback(&peer->peer_name, ORTE_RML_PEER_DISCONNECTED);
|
mca_oob_tcp.oob_exception_callback(&peer->peer_name, ORTE_RML_PEER_DISCONNECTED);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
} else if (rc == 0) {
|
} else if (rc == 0) {
|
||||||
if(mca_oob_tcp_component.tcp_debug >= OOB_TCP_DEBUG_CONNECT_FAIL) {
|
if(mca_oob_tcp_component.tcp_debug >= OOB_TCP_DEBUG_CONNECT_FAIL) {
|
||||||
opal_output(0, "%s-%s mca_oob_tcp_msg_recv: peer closed connection",
|
opal_output(0, "%s-%s mca_oob_tcp_msg_recv: peer closed connection",
|
||||||
@ -289,7 +293,7 @@ static bool mca_oob_tcp_msg_recv(mca_oob_tcp_msg_t* msg, mca_oob_tcp_peer_t* pee
|
|||||||
(msg->msg_rwnum)--;
|
(msg->msg_rwnum)--;
|
||||||
(msg->msg_rwptr)++;
|
(msg->msg_rwptr)++;
|
||||||
if(0 == msg->msg_rwnum) {
|
if(0 == msg->msg_rwnum) {
|
||||||
assert( 0 == rc );
|
assert( 0 == rc );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user