Add reason checking on provider rejects and set appropriate op type
in reject message. Reject can be called from cr callback during
failures. User reject will be IB_CM_REJ_REASON_CONSUMER_REJ.

Signed-off-by: Arlin Davis <[email protected]>
---
 dapl/openib_scm/cm.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/dapl/openib_scm/cm.c b/dapl/openib_scm/cm.c
index b6109f1..a34965b 100644
--- a/dapl/openib_scm/cm.c
+++ b/dapl/openib_scm/cm.c
@@ -1666,7 +1666,11 @@ dapls_ib_reject_connection(IN dp_ib_cm_handle_t cm_ptr,
                 return DAT_LENGTH_ERROR;
 
        /* write reject data to indicate reject */
-       cm_ptr->msg.op = htons(DCM_REJ_USER);
+       if (reason == IB_CM_REJ_REASON_CONSUMER_REJ)
+               cm_ptr->msg.op = htons(DCM_REJ_USER);
+       else
+               cm_ptr->msg.op = htons(DCM_REJ_CM);
+
        cm_ptr->msg.p_size = htons(psize);
        
        iov[0].iov_base = (void *)&cm_ptr->msg;
-- 
1.7.3



_______________________________________________
ofw mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw

Reply via email to