[OPENSM] When trying to set to INIT the remote port of the given physical port
authorsleybo <sleybo@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 20 Aug 2006 13:55:49 +0000 (13:55 +0000)
committersleybo <sleybo@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 20 Aug 2006 13:55:49 +0000 (13:55 +0000)
in function __osm_lid_mgr_set_remote_pi_state_to_init, there was no
check whether the physical port in null (e.g., if it's disconnected).

git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@460 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

ulp/opensm/user/opensm/osm_lid_mgr.c

index ca94aee..8632251 100644 (file)
@@ -301,20 +301,20 @@ osm_lid_mgr_init(
   {
     if (osm_db_restore(p_mgr->p_g2l))
     {
-        if (p_subn->opt.exit_on_fatal) 
-        {
-           osm_log( p_mgr->p_log, OSM_LOG_SYS,
-                   "Fatal: Error restoring Guid-to-Lid persistent database\n" );
-          status = IB_ERROR;
-          goto Exit;
-        }
-        else
-        {
-           osm_log( p_mgr->p_log, OSM_LOG_ERROR,
-                 "osm_lid_mgr_init: ERR 0317: "
-                 "Error restoring Guid-to-Lid persistent database\n");
-        }
-    } 
+      if (p_subn->opt.exit_on_fatal) 
+      {
+        osm_log( p_mgr->p_log, OSM_LOG_SYS,
+                 "Fatal: Error restoring Guid-to-Lid persistent database\n" );
+        status = IB_ERROR;
+        goto Exit;
+      }
+      else
+      {
+       osm_log( p_mgr->p_log, OSM_LOG_ERROR,
+                "osm_lid_mgr_init: ERR 0317: "
+                "Error restoring Guid-to-Lid persistent database\n");
+      }
+    }
 
     /* we need to make sure we did not get duplicates with
        current lmc */
@@ -927,7 +927,8 @@ __osm_lid_mgr_set_remote_pi_state_to_init(
   ib_port_info_t *p_pi;
   osm_physp_t *p_rem_physp = osm_physp_get_remote(p_physp);
 
-  CL_ASSERT(p_rem_physp);
+  if ( p_rem_physp == NULL )
+    return;
 
   if (osm_physp_is_valid( p_rem_physp ))
   {