diff mbox

return no path when path does not exist

Message ID 4C10FE4B.9080106@gmail.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Eli Dorfman (Voltaire) June 10, 2010, 3:01 p.m. UTC
None
diff mbox

Patch

diff --git a/opensm/opensm/osm_switch.c b/opensm/opensm/osm_switch.c
index 311c4f7..b621852 100644
--- a/opensm/opensm/osm_switch.c
+++ b/opensm/opensm/osm_switch.c
@@ -628,6 +628,8 @@  uint8_t osm_switch_recommend_mcast_path(IN osm_switch_t * p_sw,
 	   a black hole that will destroy the Earth in a firey conflagration.
 	 */
 	least_hops = osm_switch_get_least_hops(p_sw, base_lid);
+	if (least_hops == OSM_NO_PATH)
+		return OSM_NO_PATH;
 	for (port_num = 1; port_num < num_ports; port_num++)
 		if (osm_switch_get_hop_count(p_sw, base_lid, port_num) ==
 		    least_hops)