[PVFS2-CVS] commit by pcarns in pvfs2/src/common/misc: server-config-mgr.c server-config-mgr.h

CVS commit program cvs at parl.clemson.edu
Thu Jul 22 13:21:41 EDT 2004


Update of /projects/cvsroot/pvfs2/src/common/misc
In directory parlweb:/tmp/cvs-serv7787/src/common/misc

Modified Files:
	server-config-mgr.c server-config-mgr.h 
Log Message:
adjust server-config-mgr to allow config information to come from different
locations depending on whether it is called on client or server


Index: server-config-mgr.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/common/misc/server-config-mgr.c,v
diff -p -u -r1.7 -r1.8
--- server-config-mgr.c	8 Jul 2004 21:02:20 -0000	1.7
+++ server-config-mgr.c	22 Jul 2004 16:21:41 -0000	1.8
@@ -314,7 +314,7 @@ int PINT_server_config_mgr_remove_config
     return ret;
 }
 
-struct server_configuration_s *PINT_server_config_mgr_get_config(
+struct server_configuration_s *__PINT_server_config_mgr_get_config(
     PVFS_fs_id fs_id)
 {
     struct server_configuration_s *ret = NULL;
@@ -345,7 +345,7 @@ struct server_configuration_s *PINT_serv
     return ret;
 }
 
-void PINT_server_config_mgr_put_config(
+void __PINT_server_config_mgr_put_config(
     struct server_configuration_s *config_s)
 {
     PINT_llist *cur = NULL;

Index: server-config-mgr.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/common/misc/server-config-mgr.h,v
diff -p -u -r1.2 -r1.3
--- server-config-mgr.h	8 Jul 2004 21:02:20 -0000	1.2
+++ server-config-mgr.h	22 Jul 2004 16:21:41 -0000	1.3
@@ -22,12 +22,24 @@ int PINT_server_config_mgr_add_config(
 int PINT_server_config_mgr_remove_config(
     PVFS_fs_id fs_id);
 
-struct server_configuration_s *PINT_server_config_mgr_get_config(
+struct server_configuration_s *__PINT_server_config_mgr_get_config(
     PVFS_fs_id fs_id);
 
-void PINT_server_config_mgr_put_config(
+void __PINT_server_config_mgr_put_config(
     struct server_configuration_s *config_s);
 
+/* client and server retrieve fs configuration from different sources */
+#if defined(__PVFS2_CLIENT__)
+#define PINT_server_config_mgr_get_config __PINT_server_config_mgr_get_config
+#define PINT_server_config_mgr_put_config __PINT_server_config_mgr_put_config
+#elif defined(__PVFS2_SERVER__)
+static inline void __PINT_server_config_mgr_put_config_null(
+    struct server_configuration_s *config_s){return;}
+#define PINT_server_config_mgr_get_config(__fsid) get_server_config_struct()
+#define PINT_server_config_mgr_put_config \
+ __PINT_server_config_mgr_put_config_null
+#else
+#endif
 
 #endif  /* __SERVER_CONFIG_MGR_H */
 /*



More information about the PVFS2-CVS mailing list