From 0117055115931c92dde170513b1dc274d849855c Mon Sep 17 00:00:00 2001 From: Sarit Zubakov Date: Thu, 9 Mar 2017 13:32:43 +0000 Subject: [PATCH] msg/async/rdma: Update fix broken compilation This commit relates to fix broken compilation commit# b8f91aa Assumption: If "out" is NULL then there is no communication and it is safe to assert. issue:985021 Change-Id: I76c5a1c875a634a74b8aa962294c6c834f0675d9 Signed-off-by: Sarit Zubakov --- src/msg/async/rdma/RDMAServerSocketImpl.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/msg/async/rdma/RDMAServerSocketImpl.cc b/src/msg/async/rdma/RDMAServerSocketImpl.cc index f15de84bec4..8f5fd81d3dc 100644 --- a/src/msg/async/rdma/RDMAServerSocketImpl.cc +++ b/src/msg/async/rdma/RDMAServerSocketImpl.cc @@ -96,6 +96,10 @@ int RDMAServerSocketImpl::accept(ConnectedSocket *sock, const SocketOptions &opt ::close(sd); return -errno; } + + assert(NULL != out); //out should not be NULL in accept connection + + out->set_sockaddr((sockaddr*)&ss); net.set_priority(sd, opt.priority, out->get_family()); RDMAConnectedSocketImpl* server; @@ -105,8 +109,6 @@ int RDMAServerSocketImpl::accept(ConnectedSocket *sock, const SocketOptions &opt ldout(cct, 20) << __func__ << " accepted a new QP, tcp_fd: " << sd << dendl; std::unique_ptr csi(server); *sock = ConnectedSocket(std::move(csi)); - if (out) - out->set_sockaddr((sockaddr*)&ss); return 0; }