1
1
openmpi/orte/mca/rml/oob/rml_oob_ping.c
Abhishek Kulkarni afbe3e99c6 * Wrap all the direct error-code checks of the form (OMPI_ERR_* == ret) with
(OMPI_ERR_* = OPAL_SOS_GET_ERR_CODE(ret)), since the return value could be a
 SOS-encoded error. The OPAL_SOS_GET_ERR_CODE() takes in a SOS error and returns
 back the native error code.

* Since OPAL_SUCCESS is preserved by SOS, also change all calls of the form
  (OPAL_ERROR == ret) to (OPAL_SUCCESS != ret). We thus avoid having to
  decode 'ret' to get the native error code.

This commit was SVN r23162.
2010-05-17 23:08:56 +00:00

43 строки
781 B
C

/*
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "orte_config.h"
#include "rml_oob.h"
#include "opal/util/argv.h"
#include "opal/util/opal_sos.h"
#include "orte/mca/errmgr/errmgr.h"
#include "orte/mca/rml/base/rml_contact.h"
int
orte_rml_oob_ping(const char* uri,
const struct timeval* tv)
{
orte_process_name_t name;
char** uris;
char** ptr;
int rc;
if (ORTE_SUCCESS != (rc = orte_rml_base_parse_uris(uri, &name, &uris))) {
ORTE_ERROR_LOG(rc);
return rc;
}
ptr = uris;
while(ptr && *ptr) {
if(ORTE_SUCCESS == (rc = orte_rml_oob_module.active_oob->oob_ping(&name, *ptr, tv)))
break;
ptr++;
}
opal_argv_free(uris);
return rc;
}