[openib-general] [PATCH 3/3] OpenSM/osm_port_profile.h: Fix reinsertion issue in osm_port_prof_set_ignored_port

Hal Rosenstock halr at voltaire.com
Sat Jan 20 07:39:39 PST 2007


OpenSM/osm_port_profile.h: Fix reinsertion issue in
osm_port_prof_set_ignored_port

In osm_port_prof_set_ignored_port, if key already exists in map, it must
be removed prior to reinserting. This is to handle more than one port
for the same GUID.

Signed-off-by: Dale Purdy <purdy at sgi.com>
Signed-off-by: Hal Rosenstock <halr at voltaire.com>

diff --git a/osm/include/opensm/osm_port_profile.h b/osm/include/opensm/osm_port
index 88d4caf..952393d 100644
--- a/osm/include/opensm/osm_port_profile.h
+++ b/osm/include/opensm/osm_port_profile.h
@@ -263,6 +263,7 @@ osm_port_prof_set_ignored_port(
   
   if (p_obj != NULL) {
         value = (size_t)p_obj;
+        cl_map_remove(p_map, port_guid);
   } 
   
   value = value | (1 << port_num);






More information about the general mailing list