\r
status = al_cep_rtu( h_cm_rep.h_al, h_cm_rep.cid,\r
p_cm_rtu->p_rtu_pdata, p_cm_rtu->rtu_length );\r
- if( status != IB_SUCCESS )\r
+ if( status != IB_SUCCESS && status != IB_INVALID_STATE )\r
{\r
err:\r
/* Reject and abort the connection. */\r
cid = cl_atomic_xchg(\r
&((al_conn_qp_t*)h_cm_rep.h_qp)->cid, AL_INVALID_CID );\r
\r
- CL_ASSERT( cid == h_cm_rep.cid );\r
-\r
- ref_al_obj( &h_cm_rep.h_qp->obj );\r
- if( al_destroy_cep(\r
- h_cm_rep.h_al, h_cm_rep.cid, deref_al_obj ) != IB_SUCCESS )\r
+ if( cid != AL_INVALID_CID )\r
{\r
- deref_al_obj( &h_cm_rep.h_qp->obj );\r
+ CL_ASSERT( cid == h_cm_rep.cid );\r
+\r
+ ref_al_obj( &h_cm_rep.h_qp->obj );\r
+ if( al_destroy_cep(\r
+ h_cm_rep.h_al, h_cm_rep.cid, deref_al_obj ) != IB_SUCCESS )\r
+ {\r
+ deref_al_obj( &h_cm_rep.h_qp->obj );\r
+ }\r
}\r
\r
AL_TRACE_EXIT( AL_DBG_ERROR,\r