set_blocking(c->rdma.cm_channel->fd, false);
c->rdma.context.c = c;
-#if RDMA_USER_CM_MAX_ABI_VERSION >= 2
- ret = rdma_create_id(c->rdma.cm_channel,
- &c->rdma.cm_id,
- &c->rdma.context,
- RDMA_PS_TCP);
-#else
-#error
- ret = rdma_create_id(c->rdma.cm_channel,
- &c->rdma.cm_id,
- &c->rdma.context);
-#endif
- if (ret != 0) {
- TALLOC_FREE(c);
-DEBUG(0,("%s:%s: here...\n", __location__, __func__));
- return NULL;
- }
//DEBUG(0,("%s:%s: here...\n", __location__, __func__));
return c;
DEBUG(0,("%s:%s: here...\n", __location__, __func__));
talloc_set_destructor(state, smb_direct_connection_rdma_connect_state_destructor);
+#if RDMA_USER_CM_MAX_ABI_VERSION >= 2
+ ret = rdma_create_id(c->rdma.cm_channel,
+ &c->rdma.cm_id,
+ &c->rdma.context,
+ RDMA_PS_TCP);
+#else
+#error
+ ret = rdma_create_id(c->rdma.cm_channel,
+ &c->rdma.cm_id,
+ &c->rdma.context);
+#endif
+ if (ret != 0) {
+DEBUG(0,("%s:%s: here...\n", __location__, __func__));
+ tevent_req_oom(req);
+ return tevent_req_post(req, ev);
+ }
+
c->rdma.fde_channel = tevent_add_fd(ev, c,
c->rdma.cm_channel->fd,
TEVENT_FD_READ,