1
1

Merge pull request #357 from hppritcha/topic/oob_send_params_check

rml/oob: check peer param in send methods
Этот коммит содержится в:
rhc54 2015-01-22 08:47:21 -08:00
родитель 94190bf04b 2809c21e0f
Коммит ccb0374376

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

@ -224,6 +224,14 @@ int orte_rml_oob_send_nb(orte_process_name_t* peer,
ORTE_ERROR_LOG(ORTE_ERR_BAD_PARAM);
return ORTE_ERR_BAD_PARAM;
}
if( NULL == peer ||
OPAL_EQUAL == orte_util_compare_name_fields(ORTE_NS_CMP_ALL, ORTE_NAME_INVALID, peer) ) {
/* cannot send to an invalid peer */
ORTE_ERROR_LOG(ORTE_ERR_BAD_PARAM);
return ORTE_ERR_BAD_PARAM;
}
/* get ourselves into an event to protect against
* race conditions and threads
*/
@ -262,6 +270,13 @@ int orte_rml_oob_send_buffer_nb(orte_process_name_t* peer,
return ORTE_ERR_BAD_PARAM;
}
if( NULL == peer ||
OPAL_EQUAL == orte_util_compare_name_fields(ORTE_NS_CMP_ALL, ORTE_NAME_INVALID, peer) ) {
/* cannot send to an invalid peer */
ORTE_ERROR_LOG(ORTE_ERR_BAD_PARAM);
return ORTE_ERR_BAD_PARAM;
}
/* get ourselves into an event to protect against
* race conditions and threads
*/