]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
[IBAL] Fixed bug where a call to al_cep_listen with a CEP in CEP_STATE_PRE_REQ
authorftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 12 Sep 2005 18:07:43 +0000 (18:07 +0000)
committerftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 12 Sep 2005 18:07:43 +0000 (18:07 +0000)
would free the MAD allocated in al_cep_pre_req, but not change the state.
If al_cep_listen fails, the state wouldn't be changed to reflect that the MAD
was returned and a subsequent call would attempt to free a NULL MAD.

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

trunk/core/al/kernel/al_cm_cep.c

index b99e16887ae47998591b50796aee33ebb36b6910..c563969e3a1d9a1aca2c8c083e241d2482a8a6dd 100644 (file)
@@ -3964,6 +3964,8 @@ al_cep_listen(
                CL_ASSERT( p_cep->p_mad );\r
                ib_put_mad( p_cep->p_mad );\r
                p_cep->p_mad = NULL;\r
+               /* Must change state here in case listen fails */\r
+               p_cep->state = CEP_STATE_IDLE;\r
                /* Fall through. */\r
        case CEP_STATE_IDLE:\r
                break;\r