[PVFS2-CVS]
commit by neill in pvfs2/src/common/misc: server-config.c
CVS commit program
cvs at parl.clemson.edu
Fri Oct 15 17:33:44 EDT 2004
Update of /projects/cvsroot/pvfs2/src/common/misc
In directory parlweb:/tmp/cvs-serv10171/src/common/misc
Modified Files:
server-config.c
Log Message:
- make sure that our error routines strip any known class error bits
instead of deciding that they're unrecognized if set
- improved trove error handling
- improved pvfs2-server error handling
- fixed crash bug in our config parser that tried to strdup strings
that might be NULL
- pvfs2-types header file simplification and cleanups
Index: server-config.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/common/misc/server-config.c,v
diff -p -u -r1.65 -r1.66
--- server-config.c 12 Aug 2004 19:53:39 -0000 1.65
+++ server-config.c 15 Oct 2004 20:33:44 -0000 1.66
@@ -258,7 +258,7 @@ DOTCONF_CB(get_pvfs_server_id)
"%s to %s).\n",config_s->host_id,cmd->data.str);
free(config_s->host_id);
}
- config_s->host_id = strdup(cmd->data.str);
+ config_s->host_id = (cmd->data.str ? strdup(cmd->data.str) : NULL);
return NULL;
}
@@ -274,7 +274,8 @@ DOTCONF_CB(get_storage_space)
gossip_err("WARNING: StorageSpace value being overwritten.\n");
free(config_s->storage_path);
}
- config_s->storage_path = strdup(cmd->data.str);
+ config_s->storage_path =
+ (cmd->data.str ? strdup(cmd->data.str) : NULL);
return NULL;
}
@@ -522,7 +523,7 @@ DOTCONF_CB(get_logfile)
"or Global block");
return NULL;
}
- config_s->logfile = strdup(cmd->data.str);
+ config_s->logfile = (cmd->data.str ? strdup(cmd->data.str) : NULL);
return NULL;
}
@@ -824,7 +825,8 @@ DOTCONF_CB(get_filesystem_name)
gossip_err("WARNING: Overwriting %s with %s\n",
fs_conf->file_system_name,cmd->data.str);
}
- fs_conf->file_system_name = strdup(cmd->data.str);
+ fs_conf->file_system_name =
+ (cmd->data.str ? strdup(cmd->data.str) : NULL);
return NULL;
}
More information about the PVFS2-CVS
mailing list