Fix create RC/UC QP with invalid CQ: initialize CID member in init_base_qp.
authorftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 6 Sep 2005 19:16:44 +0000 (19:16 +0000)
committerftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 6 Sep 2005 19:16:44 +0000 (19:16 +0000)
Submitted by Yossi Leybovich <sleybo@mellanox.co.il>

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

core/al/al_qp.c

index 9465948..b28c050 100644 (file)
@@ -623,6 +623,12 @@ init_base_qp(
        p_qp->pfn_init_dgrm_svc = al_bad_init_dgrm_svc;\r
        p_qp->pfn_join_mcast = al_bad_join_mcast;\r
 \r
+       if( p_qp->type == IB_QPT_RELIABLE_CONN ||\r
+               p_qp->type == IB_QPT_UNRELIABLE_CONN )\r
+       {\r
+               ((al_conn_qp_t*)p_qp)->cid = AL_INVALID_CID;\r
+       }\r
+\r
        return status;\r
 }\r
 \r
@@ -723,7 +729,6 @@ init_conn_qp(
        status = init_raw_qp( &p_conn_qp->qp, h_pd, UNBOUND_PORT_GUID,\r
                p_qp_create, p_umv_buf );\r
 \r
-       p_conn_qp->cid = AL_INVALID_CID;\r
 \r
        return status;\r
 }\r