} else {
io->send_wr.next = NULL;
}
+ io->send_wr.next = NULL;
DLIST_REMOVE(c->s2r.ready, io);
DLIST_ADD_END(posted, io);
DEBUG(0,("%s:%s: POST SEND[%p] data_length[%u] remaining_length[%u]\n",
__location__, __FUNCTION__, io,
(unsigned)io->data_length, (unsigned)io->remaining_length));
- }
-
- last = DLIST_TAIL(posted);
- last->send_wr.next = NULL;
-
errno = 0;
- ret = ibv_post_send(c->ibv.qp, &posted->send_wr, &bad_send_wr);
+ ret = ibv_post_send(c->ibv.qp, &io->send_wr, &bad_send_wr);
if (ret != 0) {
NTSTATUS status;
// DLIST_CONCATENATE(c->s2r.ready, posted); // TODO: check bad_send_wr
__location__, __FUNCTION__, ret, errno, nt_errstr(status)));
return ret;
}
+ }
+
+ last = DLIST_TAIL(posted);
+ last->send_wr.next = NULL;
+
+ //errno = 0;
+ //ret = ibv_post_send(c->ibv.qp, &posted->send_wr, &bad_send_wr);
+ //if (ret != 0) {
+ // NTSTATUS status;
+ //// DLIST_CONCATENATE(c->s2r.ready, posted); // TODO: check bad_send_wr
+ // status = map_nt_error_from_unix_common(errno);
+ // DEBUG(0,("%s:%s: ret[%d] errno[%d] status[%s]\n",
+ // __location__, __FUNCTION__, ret, errno, nt_errstr(status)));
+ // return ret;
+ //}
DLIST_CONCATENATE(c->s2r.posted, posted);