]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
[IBAL] CM: Fix error handling if __insert_cep fails.
authorftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 29 Aug 2006 20:46:19 +0000 (20:46 +0000)
committerftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 29 Aug 2006 20:46:19 +0000 (20:46 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1@467 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

trunk/core/al/kernel/al_cm_cep.c

index d627dbb3a4d25697675b5edb7be7ff3da7ef507c..1570718645fe77acb0692fd6a7c1eba47425d8f8 100644 (file)
@@ -1433,12 +1433,6 @@ __rep_handler(
                        /* Roll back the state change. */\r
                        __reject_mad( p_port_cep, p_cep, p_mad, IB_REJ_STALE_CONN );\r
                        p_cep->state = old_state;\r
-                       /*\r
-                        * Clear the remote QPN and comm ID so that we don't try\r
-                        * to remove the CEP from those maps.\r
-                        */\r
-                       p_cep->remote_qpn = 0;\r
-                       p_cep->remote_comm_id = 0;\r
                        status = __process_stale( p_cep );\r
                }\r
                else\r
@@ -2802,17 +2796,22 @@ __insert_cep(
 \r
        p_cep = __insert_by_qpn( p_new_cep );\r
        if( p_cep != p_new_cep )\r
-               goto done;\r
+               goto err;\r
 \r
        p_cep = __insert_by_id( p_new_cep );\r
        if( p_cep != p_new_cep )\r
        {\r
                cl_rbmap_remove_item(\r
                        &gp_cep_mgr->conn_qp_map, &p_new_cep->rem_qp_item );\r
-               p_cep->remote_qpn = 0;\r
+err:\r
+               /*\r
+                * Clear the remote QPN and comm ID so that we don't try\r
+                * to remove the CEP from those maps.\r
+                */\r
+               p_new_cep->remote_qpn = 0;\r
+               p_new_cep->remote_comm_id = 0;\r
        }\r
 \r
-done:\r
        AL_EXIT( AL_DBG_CM );\r
        return p_cep;\r
 }\r