[ofa-general] [PATCH] OpenSM/osm_sm_state_mgr.c: In __osm_sm_state_mgr_send_master_sm_info_req, handle master GUID port not found

Hal Rosenstock halr at voltaire.com
Tue Mar 27 09:42:21 PDT 2007


OpenSM/osm_sm_state_mgr.c: In
__osm_sm_state_mgr_send_master_sm_info_req, handle master GUID port not
found properly

Signed-off-by: Hal Rosenstock <halr at voltaire.com>

diff --git a/osm/opensm/osm_sm_state_mgr.c b/osm/opensm/osm_sm_state_mgr.c
index 41153fc..002821b 100644
--- a/osm/opensm/osm_sm_state_mgr.c
+++ b/osm/opensm/osm_sm_state_mgr.c
@@ -231,6 +231,11 @@ __osm_sm_state_mgr_send_master_sm_info_r
        */
       p_port = ( osm_port_t * ) cl_qmap_get( &p_sm_mgr->p_subn->port_guid_tbl,
                                              p_sm_mgr->master_guid );
+      if( p_port ==
+           ( osm_port_t * ) cl_qmap_end( &p_sm_mgr->p_subn->port_guid_tbl ) )
+      {
+        p_port = NULL;
+      }
    }
    else
    {






More information about the general mailing list