[PVFS2-CVS] commit by pcarns in pvfs2/src/client/sysint: msgpairarray.sm

CVS commit program cvs at parl.clemson.edu
Thu May 6 11:06:08 EDT 2004


Update of /projects/cvsroot/pvfs2/src/client/sysint
In directory parlweb:/tmp/cvs-serv8078

Modified Files:
	msgpairarray.sm 
Log Message:
Added final BMI cancel cases: cancel the associated pending send or recv in the
general case if a nonblocking send or recv fails.  


Index: msgpairarray.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/msgpairarray.sm,v
diff -p -u -r1.41 -r1.42
--- msgpairarray.sm	6 May 2004 13:54:18 -0000	1.41
+++ msgpairarray.sm	6 May 2004 14:06:08 -0000	1.42
@@ -359,9 +359,13 @@ static int msgpairarray_complete(PINT_cl
 	if(msg_p->op_status == 0)
 	    msg_p->op_status = msg_p->recv_status.error_code;
 
-	/* TODO: if we had a good way to tell if a send were still pending,
-	 * then we could cancel here
-	 */
+	if(msg_p->recv_status.error_code && msg_p->send_id != 0)
+	{
+	    /* we got a receive error, but send is still pending.  Cancel
+	     * the send
+	     */
+	    PINT_client_bmi_cancel(msg_p->send_id);
+	}
     }
     else
     {
@@ -375,9 +379,13 @@ static int msgpairarray_complete(PINT_cl
 	if(msg_p->op_status == 0)
 	    msg_p->op_status = msg_p->send_status.error_code;
 
-	/* TODO: if we had a good way to tell if a recv were still pending,
-	 * then we could cancel here
-	 */
+	if(msg_p->send_status.error_code && msg_p->recv_id != 0)
+	{
+	    /* we got a send error, but recv is still pending.  Cancel
+	     * the recv 
+	     */
+	    PINT_client_bmi_cancel(msg_p->recv_id);
+	}
     }
 
     /* decrement comp_ct until all operations have completed */



More information about the PVFS2-CVS mailing list