[Pvfs2-cvs] commit by pcarns in pvfs2-1/src/client/sysint: client-state-machine.c

CVS commit program cvs at parl.clemson.edu
Thu May 22 10:57:55 EDT 2008


Update of /projects/cvsroot/pvfs2-1/src/client/sysint
In directory parlweb1:/tmp/cvs-serv1335

Modified Files:
	client-state-machine.c 
Log Message:
Don't retrieve the sm frame (for error code purposes) in sys_wait()
until the state machine has completed.  Otherwise it may get the wrong
error code if the machine happened to have another frame (such as
the new msgpairarray frame) on the stack when sys_wait() was invoked.
This fixes the pvfs2-cp bug reported by Nick Mills.


Index: client-state-machine.c
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/src/client/sysint/client-state-machine.c,v
diff -p -u -r1.96 -r1.97
--- client-state-machine.c	15 Apr 2008 15:42:07 -0000	1.96
+++ client-state-machine.c	22 May 2008 14:57:54 -0000	1.97
@@ -760,7 +760,6 @@ PVFS_error PINT_client_wait_internal(
     {
         smcb = PINT_id_gen_safe_lookup(op_id);
         assert(smcb);
-        sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT);
 
         do
         {
@@ -772,6 +771,8 @@ PVFS_error PINT_client_wait_internal(
             ret = PINT_client_state_machine_test(op_id, out_error);
 
         } while (!PINT_smcb_complete(smcb) && (ret == 0));
+
+        sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT);
 
         if (ret)
         {



More information about the Pvfs2-cvs mailing list