int index;\r
volatile LONG refcnt;\r
struct rdma_cm_id **req_list;\r
+int active;\r
};\r
\r
struct cma_device\r
RtlCopyMemory(attr.Data, conn_param->private_data, attr.DataLength);\r
}\r
\r
+id_priv->active = 1;\r
id_priv->state = cma_active_connect;\r
id_priv->refcnt++;\r
id->comp_entry.Busy = 1;\r
HRESULT hr;\r
\r
id_priv = CONTAINING_RECORD(id, struct cma_id_private, id);\r
+ EnterCriticalSection(&lock);\r
if (id_priv->state == cma_connected) {\r
id_priv->state = cma_active_disconnect;\r
- } else {\r
+ } else if (id_priv->state == cma_passive_disconnect) {\r
id_priv->state = cma_disconnected;\r
}\r
+ LeaveCriticalSection(&lock);\r
hr = id->ep.connect->Disconnect(NULL);\r
if (FAILED(hr)) {\r
return hr;\r