diff --git a/ompi/mca/btl/openib/btl_openib_endpoint.c b/ompi/mca/btl/openib/btl_openib_endpoint.c index d1db30dca8..7d9f29856e 100644 --- a/ompi/mca/btl/openib/btl_openib_endpoint.c +++ b/ompi/mca/btl/openib/btl_openib_endpoint.c @@ -638,9 +638,13 @@ int mca_btl_openib_endpoint_send(mca_btl_base_endpoint_t* ep, rc = check_endpoint_state(ep, &to_base_frag(frag)->base, &ep->pending_lazy_frags); - if(OPAL_LIKELY(rc == OMPI_SUCCESS)) + if(OPAL_LIKELY(OMPI_SUCCESS == rc)) { rc = mca_btl_openib_endpoint_post_send(ep, frag); + } OPAL_THREAD_UNLOCK(&ep->endpoint_lock); + if (OPAL_UNLIKELY(OMPI_ERR_RESOURCE_BUSY == rc)) { + rc = OMPI_SUCCESS; + } return rc; } diff --git a/ompi/mca/btl/openib/btl_openib_endpoint.h b/ompi/mca/btl/openib/btl_openib_endpoint.h index 1dd348a02f..b29266f6d5 100644 --- a/ompi/mca/btl/openib/btl_openib_endpoint.h +++ b/ompi/mca/btl/openib/btl_openib_endpoint.h @@ -380,13 +380,13 @@ try_send: static inline int check_endpoint_state(mca_btl_openib_endpoint_t *ep, mca_btl_base_descriptor_t *des, opal_list_t *pending_list) { - int rc = ORTE_ERR_RESOURCE_BUSY; + int rc = OMPI_ERR_RESOURCE_BUSY; switch(ep->endpoint_state) { case MCA_BTL_IB_CLOSED: rc = ep->endpoint_local_cpc->cbm_start_connect(ep->endpoint_local_cpc, ep); if (OMPI_SUCCESS == rc) { - rc = ORTE_ERR_RESOURCE_BUSY; + rc = OMPI_ERR_RESOURCE_BUSY; } /* * As long as we expect a message from the peer (in order