[WSD] Only send DREP if we changed socket state. No need to send if in
authorftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 27 Sep 2005 00:27:19 +0000 (00:27 +0000)
committerftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 27 Sep 2005 00:27:19 +0000 (00:27 +0000)
other states since it will have been sent by some other means (e.g. QP
destruction).

Signed-off-by: Fab Tillier (ftillier@silverstorm.com)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@89 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

ulp/wsd/user/ib_cm.c

index c82fb0f..44d639b 100644 (file)
@@ -531,14 +531,14 @@ cm_dreq_callback(
                        ibsp_conn_remove( socket_info );\r
                        socket_info->qp_error = WSAECONNRESET;\r
                }\r
-       }\r
-       cl_spinlock_release( &socket_info->mutex );\r
 \r
-       memset( &cm_drep, 0, sizeof(cm_drep) );\r
+               memset( &cm_drep, 0, sizeof(cm_drep) );\r
 \r
-       status = ib_cm_drep( p_cm_dreq_rec->h_cm_dreq, &cm_drep );\r
-       if( status != IB_SUCCESS )\r
-               IBSP_ERROR( ("ib_cm_drep returned %s\n", ib_get_err_str( status )) );\r
+               status = ib_cm_drep( p_cm_dreq_rec->h_cm_dreq, &cm_drep );\r
+               if( status != IB_SUCCESS )\r
+                       IBSP_ERROR( ("ib_cm_drep returned %s\n", ib_get_err_str( status )) );\r
+       }\r
+       cl_spinlock_release( &socket_info->mutex );\r
 \r
        IBSP_EXIT( IBSP_DBG_CM );\r
 }\r