]> git.openfabrics.org - ~ardavis/dapl.git/commitdiff
remove unnecessary assert from dapl_ep_free.
authorArlin Davis <arlin.r.davis@intel.com>
Tue, 18 Mar 2008 23:11:07 +0000 (15:11 -0800)
committerArlin Davis <arlin.r.davis@intel.com>
Tue, 18 Mar 2008 23:11:07 +0000 (15:11 -0800)
dat_ep_free must handle the case where a consumer calls
free in CONNECTED or DISCONNECT_PENDING states. After
free calls disconnect, there may be a pending event,
in which case the providers dapls_ib_qp_free will block
accordingly and handle pending events.

Signed-off by: Arlin Davis ardavis@ichips.intel.com

dapl/common/dapl_ep_free.c

index 3bf41ab6eefaea1dbad2f5bfead2b212e51744fa..43268254cbbf8d9b61c059639120280c7c67f1f8 100644 (file)
@@ -110,14 +110,22 @@ dapl_ep_free (
      * Invoke ep_disconnect to clean up outstanding connections
      */
     (void) dapl_ep_disconnect (ep_ptr, DAT_CLOSE_ABRUPT_FLAG);
-    dapl_os_assert (ep_ptr->param.ep_state == DAT_EP_STATE_DISCONNECTED ||
-                   ep_ptr->param.ep_state == DAT_EP_STATE_UNCONNECTED);
 
     /*
      * Do verification of parameters and the state change atomically.
      */
     dapl_os_lock ( &ep_ptr->header.lock );
 
+#ifdef DAPL_DBG
+    /* check if event pending and warn, don't assert, state is valid */
+    if (ep_ptr->param.ep_state == DAT_EP_STATE_DISCONNECT_PENDING) {
+        dapl_dbg_log (DAPL_DBG_TYPE_WARN, " dat_ep_free WARNING: "
+                      "EVENT PENDING on ep %p, disconnect "
+                      "and wait before calling dat_ep_free\n",
+                      ep_ptr);
+    }
+#endif
+
     if (ep_ptr->cxn_timer != NULL)
     {
        dapls_timer_cancel ( ep_ptr->cxn_timer );