[PVFS2-CVS] commit by bradles in pvfs2/src/client/sysint: client-state-machine.h server-get-config.sm

CVS commit program cvs at parl.clemson.edu
Thu May 6 13:20:18 EDT 2004


Update of /projects/cvsroot/pvfs2/src/client/sysint
In directory styx.parl.clemson.edu:/tmp/cvs-serv4820/src/client/sysint

Modified Files:
	client-state-machine.h server-get-config.sm 
Log Message:
Adding support for get_config state variable persist_config_buffers.

When 0 the existing behavior is reproduced, the config buffers are free'd
when the get_config is completed.  When persist_config_buffers is 1,
fs_config_buf and server_config_buf are not free'd by the state machine and
must be free'd by the user.  This was added so that pvfs2-check-config can
compare each servers config files.  Checkpoint checkin.


Index: client-state-machine.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/client-state-machine.h,v
diff -p -u -r1.104 -r1.105
--- client-state-machine.h	6 May 2004 12:51:41 -0000	1.104
+++ client-state-machine.h	6 May 2004 16:20:18 -0000	1.105
@@ -326,6 +326,7 @@ struct PINT_server_get_config_sm {
     uint32_t fs_config_buf_size;
     char *server_config_buf;
     uint32_t server_config_buf_size;
+    int persist_config_buffers;
 };
 
 typedef struct PINT_client_sm {

Index: server-get-config.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/server-get-config.sm,v
diff -p -u -r1.2 -r1.3
--- server-get-config.sm	6 May 2004 12:59:16 -0000	1.2
+++ server-get-config.sm	6 May 2004 16:20:18 -0000	1.3
@@ -183,7 +183,7 @@ int PINT_server_get_config(struct server
 
  cleanup:
 
-    if (sm_p != NULL)
+    if (sm_p != NULL && 0 == sm_p->u.get_config.persist_config_buffers)
     {
 	free(sm_p->u.get_config.fs_config_buf);
 	free(sm_p->u.get_config.server_config_buf);



More information about the PVFS2-CVS mailing list