]> git.openfabrics.org - ~ardavis/dapl.git/commitdiff
common: cleanup CR linkings after DTO error on EP
authorArlin Davis <arlin.r.davis@intel.com>
Mon, 2 Aug 2010 16:51:30 +0000 (09:51 -0700)
committerArlin Davis <arlin.r.davis@intel.com>
Mon, 2 Aug 2010 16:51:30 +0000 (09:51 -0700)
Add cleanup to remove CR from SP and EP
during DTO errors in dapli_evd_cqe_to_event.

dapl_sp_remove_ep needs to remove cr_ptr
reference from EP before freeing cr object.

Signed-off-by: Arlin Davis <arlin.r.davis@intel.com>
dapl/common/dapl_evd_util.c
dapl/common/dapl_sp_util.c

index cb3eb1b7da136dff2880b04fd2b0e056222dea53..12d38ffe1f52d14c732442a089cd3a2edf310bc9 100644 (file)
@@ -1316,6 +1316,7 @@ dapli_evd_cqe_to_event(IN DAPL_EVD * evd_ptr,
 
                        /* ... and clean up the local side */
                        evd_ptr = (DAPL_EVD *) ep_ptr->param.connect_evd_handle;
+                       dapl_sp_remove_ep (ep_ptr);
                        if (evd_ptr != NULL) {
                                dapls_evd_post_connection_event(evd_ptr,
                                                                DAT_CONNECTION_EVENT_BROKEN,
index c1a3fdb7fb4817f7077eb61ac382870d73ced2c7..fba371137d21d523a34eabeb375dee911db37d49 100644 (file)
@@ -264,6 +264,8 @@ void dapl_sp_remove_ep(IN DAPL_EP * ep_ptr)
 
                dapl_os_unlock(&sp_ptr->header.lock);
 
+               ep_ptr->cr_ptr = NULL;
+
                /* free memory outside of the lock */
                dapls_cr_free(cr_ptr);