Hey all,

I found a bug in the error checking for PINT_parse_config(). For some
reason this function returns 0 on succes and 1 on error. The current
code in pvfs2-server.c throws an error if the return value is less
than zero, which obviously never happens. As a result the server
doesn't shut down after a configuration error.

I made a few simple changes to fix the problem. They are included in
the attached patch file.

--Nick
Index: src/server/pvfs2-server.c
===================================================================
RCS file: /anoncvs/pvfs2/src/server/pvfs2-server.c,v
retrieving revision 1.253
diff -u -p -r1.253 pvfs2-server.c
--- src/server/pvfs2-server.c	6 Apr 2008 23:11:54 -0000	1.253
+++ src/server/pvfs2-server.c	22 May 2008 17:54:14 -0000
@@ -206,11 +206,12 @@ int main(int argc, char **argv)
     /* code to handle older two config file format */
 
     ret = PINT_parse_config(&server_config, fs_conf, s_server_options.server_alias);
-    if (ret < 0)
+    if (ret)
     {
         gossip_err("Error: Please check your config files.\n");
         gossip_err("Error: Server aborting.\n");
         free(s_server_options.server_alias);
+        ret = -PVFS_EINVAL;
         goto server_shutdown;
     }
 
_______________________________________________
Pvfs2-developers mailing list
Pvfs2-developers@beowulf-underground.org
http://www.beowulf-underground.org/mailman/listinfo/pvfs2-developers

Reply via email to