Skip to content

Commit f48b901

Browse files
author
Ralph Castain
committed
Some minor cleanup. We really don't need another peer error constant to indicate that a peer closed as we already have one for "connection failed", and that's all we really know. Update the orte constants to track their opal equivalents.
1 parent 3299b07 commit f48b901

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

orte/include/orte/constants.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,10 @@ enum {
8282
ORTE_ERR_TAKE_NEXT_OPTION = OPAL_ERR_TAKE_NEXT_OPTION,
8383
ORTE_ERR_PROC_ENTRY_NOT_FOUND = OPAL_ERR_PROC_ENTRY_NOT_FOUND,
8484
ORTE_ERR_DATA_VALUE_NOT_FOUND = OPAL_ERR_DATA_VALUE_NOT_FOUND,
85-
85+
ORTE_ERR_CONNECTION_FAILED = OPAL_ERR_CONNECTION_FAILED,
86+
ORTE_ERR_AUTHENTICATION_FAILED = OPAL_ERR_AUTHENTICATION_FAILED,
87+
ORTE_ERR_COMM_FAILURE = OPAL_ERR_COMM_FAILURE,
88+
8689
/* error codes specific to ORTE - don't forget to update
8790
orte/util/error_strings.c when adding new error codes!!
8891
Otherwise, the error reporting system will potentially crash,
@@ -94,8 +97,6 @@ enum {
9497
ORTE_ERR_REQUEST = (ORTE_ERR_BASE - 4),
9598
ORTE_ERR_NO_CONNECTION_ALLOWED = (ORTE_ERR_BASE - 5),
9699
ORTE_ERR_CONNECTION_REFUSED = (ORTE_ERR_BASE - 6),
97-
ORTE_ERR_CONNECTION_FAILED = (ORTE_ERR_BASE - 7),
98-
ORTE_ERR_COMM_FAILURE = (ORTE_ERR_BASE - 8),
99100
ORTE_ERR_COMPARE_FAILURE = (ORTE_ERR_BASE - 9),
100101
ORTE_ERR_COPY_FAILURE = (ORTE_ERR_BASE - 10),
101102
ORTE_ERR_PROC_STATE_MISSING = (ORTE_ERR_BASE - 11),
@@ -132,8 +133,7 @@ enum {
132133
ORTE_ERR_SENSOR_LIMIT_EXCEEDED = (ORTE_ERR_BASE - 42),
133134
ORTE_ERR_ALLOCATION_PENDING = (ORTE_ERR_BASE - 43),
134135
ORTE_ERR_NO_PATH_TO_TARGET = (ORTE_ERR_BASE - 44),
135-
ORTE_ERR_OP_IN_PROGRESS = (ORTE_ERR_BASE - 45),
136-
ORTE_ERR_PEER_CLOSED = (ORTE_ERR_BASE - 46)
136+
ORTE_ERR_OP_IN_PROGRESS = (ORTE_ERR_BASE - 45)
137137
};
138138

139139
#define ORTE_ERR_MAX (ORTE_ERR_BASE - 100)

orte/orted/pmix/pmix_server_sendrecv.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ static int read_bytes(pmix_server_peer_t* peer)
310310
//if (NULL != pmix_server.oob_exception_callback) {
311311
// pmix_server.oob_exception_callback(&peer->peer_name, ORTE_RML_PEER_DISCONNECTED);
312312
//}
313-
return ORTE_ERR_PEER_CLOSED;
313+
return ORTE_ERR_CONNECTION_FAILED;
314314
}
315315
/* we were able to read something, so adjust counters and location */
316316
peer->recv_msg->rdbytes -= rc;

orte/util/error_strings.c

-6
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,6 @@ int orte_err2str(int errnum, const char **errmsg)
6363
case ORTE_ERR_CONNECTION_REFUSED:
6464
retval = "Connection refused";
6565
break;
66-
case ORTE_ERR_CONNECTION_FAILED:
67-
retval = "Connection failed";
68-
break;
69-
case ORTE_ERR_COMM_FAILURE:
70-
retval = "Communication failure";
71-
break;
7266
case ORTE_ERR_TYPE_MISMATCH:
7367
retval = "Type mismatch";
7468
break;

0 commit comments

Comments
 (0)