Added a check to the return value of the post send requests.

Signed-off-by: Dotan Barak <[EMAIL PROTECTED]>

Index: latest/src/userspace/librdmacm/examples/cmatose.c
===================================================================
--- latest.orig/src/userspace/librdmacm/examples/cmatose.c      2006-04-03 
08:05:39.000000000 +0300
+++ latest/src/userspace/librdmacm/examples/cmatose.c   2006-04-03 
16:47:24.000000000 +0300
@@ -204,9 +204,13 @@ static int post_sends(struct cmatest_nod
        sge.lkey = node->mr->lkey;
        sge.addr = (uintptr_t) node->mem;
 
-       for (i = 0; i < message_count && !ret; i++)
+       for (i = 0; i < message_count && !ret; i++) {
                ret = ibv_post_send(node->cma_id->qp, &send_wr, &bad_send_wr);
-
+               if (ret) {
+                       printf("failed to post sends: %d\n", ret);
+                       break;
+               }
+       }
        return ret;
 }
_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to