[openib-general] [PATCH] - rping - recv completion can occur before established event

Steve Wise swise at opengridcomputing.com
Fri Apr 7 08:36:43 PDT 2006


Sean,

Here's a patch to librdmacm/examples/rping.c to handle the case on the
server side where the first RECV completion happens before the connect
ESTABLISHED event.  This can happen (and does :).

Signed-off-by: Steve Wise <swise at opengridcomputing.com>


Index: rping.c
===================================================================
--- rping.c	(revision 6229)
+++ rping.c	(working copy)
@@ -326,7 +326,7 @@
 	}
 
 	sem_wait(&cb->sem);
-	if (cb->state != CONNECTED) {
+	if (cb->state == ERROR) {
 		fprintf(stderr, "wait for CONNECTED state %d\n", cb->state);
 		return -1;
 	}




More information about the general mailing list