[openib-general] [PATCH] [MINOR} OpenSM/osm_port_info_rcv.c: Move assert to before where PortInfo is assumed
Hal Rosenstock
halr at voltaire.com
Wed Jun 14 21:10:42 PDT 2006
OpenSM/osm_port_info_rcv.c: Move assert to before where PortInfo is
assumed as shouldn't be processing as PortInfo unless it really is
Signed-off-by: Hal Rosenstock <halr at voltaire.com>
Index: opensm/osm_port_info_rcv.c
===================================================================
--- opensm/osm_port_info_rcv.c (revision 7961)
+++ opensm/osm_port_info_rcv.c (working copy)
@@ -683,6 +683,8 @@ osm_pi_rcv_process(
p_context = osm_madw_get_pi_context_ptr( p_madw );
p_pi = (ib_port_info_t*)ib_smp_get_payload_ptr( p_smp );
+ CL_ASSERT( p_smp->attr_id == IB_MAD_ATTR_PORT_INFO );
+
/* On receipt of client reregister, clear the reregister bit so
reregistering won't be sent again and again */
if ( ib_port_info_get_client_rereg( p_pi ) )
@@ -698,8 +700,6 @@ osm_pi_rcv_process(
port_guid = p_context->port_guid;
node_guid = p_context->node_guid;
- CL_ASSERT( p_smp->attr_id == IB_MAD_ATTR_PORT_INFO );
-
osm_dump_port_info(
p_rcv->p_log, node_guid, port_guid, port_num, p_pi, OSM_LOG_DEBUG);
More information about the general
mailing list