]> git.openfabrics.org - ~shefty/librdmacm.git/commitdiff
librdmacm Pass back the status or errno in RDMA CM events.
authorSteve Wise <swise@opengridcomputing.com>
Fri, 15 Dec 2006 22:56:06 +0000 (16:56 -0600)
committerSean Hefty <sean.hefty@intel.com>
Thu, 28 Dec 2006 23:56:00 +0000 (15:56 -0800)
The librdmacm code isn't passing back the errno in all events.

For example, if a connection request times out the kernel CMA will pass
up event RDMA_CM_EVENT_UNREACHABLE with the status set to -ETIMEDOUT.
This errno isn't currently passed back to the librdmacm user in the event.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
src/cma.c

index 5cffa181247bf4b1b90c0552e9491788783a198a..850f38127c6cccf8dd9b488054ef4366d522a40c 100644 (file)
--- a/src/cma.c
+++ b/src/cma.c
@@ -1302,6 +1302,7 @@ retry:
        default:
                evt->id_priv = (void *) (uintptr_t) resp->uid;
                evt->event.id = &evt->id_priv->id;
+               evt->event.status = resp->status;
                if (evt->id_priv->id.ps == RDMA_PS_TCP)
                        ucma_copy_conn_event(evt, &resp->param.conn);
                else