From 8dd21c77366c2d0f24ec00dbcd66b0b4500d0b03 Mon Sep 17 00:00:00 2001
From: Nadezhda Kogteva <nadezhda.kogteva@itseez.com>
Date: Tue, 25 Nov 2014 10:45:28 +0200
Subject: [PATCH] OOB UD: fix case when multiple oob components were specified
 in command line (checking of uri).

---
 orte/mca/oob/ud/oob_ud_component.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/orte/mca/oob/ud/oob_ud_component.c b/orte/mca/oob/ud/oob_ud_component.c
index 639c568b77..9327e78514 100644
--- a/orte/mca/oob/ud/oob_ud_component.c
+++ b/orte/mca/oob/ud/oob_ud_component.c
@@ -481,9 +481,12 @@ static int mca_oob_ud_component_set_addr(orte_process_name_t *peer, char **uris)
     OPAL_THREAD_LOCK(&mca_oob_ud_component.ud_lock);
 
     for (int i = 0; NULL != uris[i]; i++) {
-        if (NULL != mca_oob_ud_module.api.set_addr) {
-            if (ORTE_SUCCESS != (rc = mca_oob_ud_module.api.set_addr(peer, uris[i]))) {
-                return rc;
+        if (0 == strncmp(uris[i], "ud:", 3)) {
+            if (NULL != mca_oob_ud_module.api.set_addr) {
+                if (ORTE_SUCCESS != (rc = mca_oob_ud_module.api.set_addr(peer, uris[i]))) {
+                    OPAL_THREAD_UNLOCK(&mca_oob_ud_component.ud_lock);
+                    return rc;
+                }
             }
         }
     }