summaryrefslogtreecommitdiffstats
path: root/src/H5FDlog.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>2000-05-18 16:40:20 (GMT)
committerRobb Matzke <matzke@llnl.gov>2000-05-18 16:40:20 (GMT)
commitbc520e88b4ad3b175c0aeca2c90e021956676533 (patch)
tree814fa010e05cff2b586c3b947616f4af8b363cf4 /src/H5FDlog.c
parent356495d12608a896fdc67bef0ab446cb1a74f8f8 (diff)
downloadhdf5-bc520e88b4ad3b175c0aeca2c90e021956676533.zip
hdf5-bc520e88b4ad3b175c0aeca2c90e021956676533.tar.gz
hdf5-bc520e88b4ad3b175c0aeca2c90e021956676533.tar.bz2
[svn-r2262] * 2000-05-18
** src/H5Tconv.c ** src/H5Tpkg.h ** src/H5Tpublic.h The H5T_conv_struct_opt() function had a design flaw -- it didn't keep information about the stride to use to step through the temporary/background-value buffer and thus nested invocations would clobber each other's temp buffers. This was fixed by splitting the `stride' argument into `buf_stride' and `bkg_stride' arguments for all the conversion functions. THIS IS AN API CHANGE, but users will get a compiler warning when they pass their conversion function pointer to H5Tregister(). ** src/H5T.c ** src/H5Tprivate.h Added a bkg_stride argument to the H5T_convert() definition in order to fix a bug related to the optimized compound datatype conversion function. ** src/H5T.c ** src/H5A.c ** src/H5D.c ** src/H5Ofill.c ** src/H5P.c Added bkg_stride=0 argument to the H5T_convert() calls. ** test/dtypes.c Added a test for the H5T_conv_struct_opt() bug fixed above. ** src/H5FL.c The H5FL_term() function should return non-zero even when it couldn't free all the free lists do to their being used by some other package. When that other package terminates it will return non-zero, causing H5FL_term() to be called again. This fixes some of the `infinite loop closing library' messages. ** tools/pdb2hdf Uses print_version() instead of doing that itself. ** src/H5Ppublic.h Renamed H5Pget_gc_reference() declaration to make it match the definition. ** src/H5FDlog.c Added API tracing macros. Removed `const' qualifier from a `char*' member of a struct which was allocated on the heap. ** src/H5TB.c Added curly braces to a couple deeply-nested `if' statements to make them clearer and to shut up the increadibly stupid and just plain incorrect gcc warning about ambiguous `else'. ** test/titerate.c Removed incomplete initialization in favor of memset() for one auto variable to stop compiler warnings. ** tools/Depencencies Regenerated to remove references to h5dumputil.c
Diffstat (limited to 'src/H5FDlog.c')
-rw-r--r--src/H5FDlog.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/H5FDlog.c b/src/H5FDlog.c
index 6736402..9e3851f 100644
--- a/src/H5FDlog.c
+++ b/src/H5FDlog.c
@@ -36,7 +36,7 @@ static hid_t H5FD_QAK_g = 0;
/* Driver-specific file access properties */
typedef struct H5FD_log_fapl_t {
- const char *logfile; /* Log file name */
+ char *logfile; /* Allocated log file name */
intn verbosity; /* Verbosity of logging information */
} H5FD_log_fapl_t;
@@ -247,7 +247,7 @@ H5FD_log_init(void)
* Thursday, February 19, 1998
*
* Modifications:
- *
+ * We copy the LOGFILE value into our own access properties.
*-------------------------------------------------------------------------
*/
herr_t
@@ -257,12 +257,12 @@ H5Pset_fapl_log(hid_t fapl_id, const char *logfile, int verbosity)
herr_t ret_value=FAIL;
FUNC_ENTER(H5FD_set_fapl_log, FAIL);
- H5TRACE1("e","i",fapl_id);
+ H5TRACE3("e","isIs",fapl_id,logfile,verbosity);
if (H5P_FILE_ACCESS!=H5Pget_class(fapl_id))
HRETURN_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a fapl");
- fa.logfile=logfile;
+ fa.logfile = H5MM_strdup(logfile);
fa.verbosity=verbosity;
ret_value= H5Pset_driver(fapl_id, H5FD_QAK, &fa);
@@ -333,7 +333,7 @@ H5FD_log_fapl_copy(const void *_old_fa)
if(old_fa->logfile!=NULL)
if (NULL==(new_fa->logfile=HDstrdup(old_fa->logfile)))
HRETURN_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL,
- "unable to allocate log file name");
+ "unable to allocate log file name");
FUNC_LEAVE(new_fa);
} /* end H5FD_log_fapl_copy() */
@@ -363,8 +363,7 @@ H5FD_log_fapl_free(void *_fa)
FUNC_ENTER(H5FD_log_fapl_free, FAIL);
/* Free the fapl information */
- if(fa->logfile)
- H5MM_xfree((void *)fa->logfile);
+ H5MM_xfree(fa->logfile);
H5MM_xfree(fa);
FUNC_LEAVE(SUCCEED);