From ae7d85b6ca62679f6b9e61fc848d069fe8296ddb Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Wed, 3 Aug 2005 20:59:44 +0000 Subject: [PATCH] Fix a corner case -- if the MCA param had already been registered, be sure to look it up if NULL != current_value. This commit was SVN r6727. --- opal/mca/base/mca_base_param.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/opal/mca/base/mca_base_param.c b/opal/mca/base/mca_base_param.c index 672fb8af8d..2c8079aff7 100644 --- a/opal/mca/base/mca_base_param.c +++ b/opal/mca/base/mca_base_param.c @@ -1061,6 +1061,17 @@ static int param_register(const char *type_name, value in the old entry) */ OBJ_DESTRUCT(¶m); + + /* Finally, if we have a lookup value, look it up */ + + if (NULL != current_value) { + if (!param_lookup(i, current_value, NULL)) { + return OMPI_ERR_NOT_FOUND; + } + } + + /* Return the new index */ + return i; } }