From 02cc0cde83c234ad68e74557c8253b407bf7c965 Mon Sep 17 00:00:00 2001 From: Ralph Castain <rhc@open-mpi.org> Date: Mon, 24 May 2010 18:42:32 +0000 Subject: [PATCH] Only activate this module if specifically requested This commit was SVN r23203. --- orte/mca/db/daemon/db_daemon_component.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/orte/mca/db/daemon/db_daemon_component.c b/orte/mca/db/daemon/db_daemon_component.c index 03dd67e947..e362d49162 100644 --- a/orte/mca/db/daemon/db_daemon_component.c +++ b/orte/mca/db/daemon/db_daemon_component.c @@ -60,14 +60,22 @@ orte_db_daemon_component_open(void) return ORTE_SUCCESS; } - +/* only select us if specifically requested */ int orte_db_daemon_component_query(mca_base_module_t **module, int *priority) { + char *req; - /* if we built, then we are available */ - *priority = 100; - *module = (mca_base_module_t*)&orte_db_daemon_module; - return ORTE_SUCCESS; + if (NULL != (req = getenv("OMPI_MCA_db"))) { + if (0 == strcasecmp(req, "daemon")) { + *priority = 100; + *module = (mca_base_module_t*)&orte_db_daemon_module; + return ORTE_SUCCESS; + } + } + + *priority = 0; + *module = NULL; + return ORTE_ERROR; }