From 64fe554b8e58a3f74660ff9d3a9cc468748285bb Mon Sep 17 00:00:00 2001 From: Sharon Melamed Date: Mon, 26 May 2008 12:52:41 +0000 Subject: [PATCH] Fix bug in carto component select. After the insertion of mca_base_select the carto file component was never selected. This commit was SVN r18496. --- opal/mca/carto/file/carto_file_component.c | 23 +++++++++++----------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/opal/mca/carto/file/carto_file_component.c b/opal/mca/carto/file/carto_file_component.c index 807259feaf..4ffada706d 100644 --- a/opal/mca/carto/file/carto_file_component.c +++ b/opal/mca/carto/file/carto_file_component.c @@ -78,29 +78,28 @@ const opal_carto_base_component_1_0_0_t mca_carto_file_component = { static int file_open(void) { - int index; - mca_base_param_reg_int(&mca_carto_file_component.base_version, - "priority", - "Priority of the file carto component", - false, false, 10, NULL); mca_base_param_reg_string(&mca_carto_file_component.base_version, "path", "The path to the cartography file", false, false, NULL, &carto_file_path); + /** * If the user specified the carto file path (not NULL), use the * carto file component. The auto detect component is with * higher priority, so by default it will be chosen. */ - if (NULL != carto_file_path) { - index = mca_base_param_find("carto",NULL,NULL); - if (index != OPAL_ERROR) { - /* set the "carto" mca parameter to "file" */ - mca_base_param_set_string(index,"file"); - } + if (NULL == carto_file_path) { + mca_base_param_reg_int(&mca_carto_file_component.base_version, + "priority", + "Priority of the file carto component", + false, false, 10, NULL); + }else{ + mca_base_param_reg_int(&mca_carto_file_component.base_version, + "priority", + "Priority of the file carto component", + false, false, 12, NULL); } - return OPAL_SUCCESS; }