]> git.openfabrics.org - ~shefty/librdmacm.git/commitdiff
librdmacm/rping: return failure if address/route resolution fails
authorSean Hefty <sean.hefty@intel.com>
Thu, 28 Jun 2007 21:32:57 +0000 (14:32 -0700)
committerSean Hefty <sean.hefty@intel.com>
Thu, 28 Jun 2007 21:32:57 +0000 (14:32 -0700)
If address or route resolution fails, we still return success (0)
from rping_bind_client.  Return a failure instead.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
examples/rping.c

index c03d3b547984caabd9a74c0ce18578d1c5e3b343..5098ebcf70dc5f3c9a28bfd8cb3d1ef3ea675102 100644 (file)
@@ -920,7 +920,7 @@ static int rping_bind_client(struct rping_cb *cb)
        if (cb->state != ROUTE_RESOLVED) {
                fprintf(stderr, "waiting for addr/route resolution state %d\n",
                        cb->state);
-               return ret;
+               return -1;
        }
 
        DEBUG_LOG("rdma_resolve_addr - rdma_resolve_route successful\n");