summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRobert Kim Yates <rkyates@llnl.gov>1998-06-12 22:47:21 (GMT)
committerRobert Kim Yates <rkyates@llnl.gov>1998-06-12 22:47:21 (GMT)
commit1460b000d84086482242b3ffd2832a371d2063de (patch)
tree9035d2d7865699cfc2f3c8d4750d5d373fb00c58 /src
parentdd58a3ec29a061f42609669ff633c0763f834af9 (diff)
downloadhdf5-1460b000d84086482242b3ffd2832a371d2063de.zip
hdf5-1460b000d84086482242b3ffd2832a371d2063de.tar.gz
hdf5-1460b000d84086482242b3ffd2832a371d2063de.tar.bz2
[svn-r426] Fixed processing of debug string gotten from MPI_Info_get in H5F_mpio_open.
Diffstat (limited to 'src')
-rw-r--r--src/H5Fmpio.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/H5Fmpio.c b/src/H5Fmpio.c
index 318493c..d568d26 100644
--- a/src/H5Fmpio.c
+++ b/src/H5Fmpio.c
@@ -300,13 +300,18 @@ H5F_mpio_open(const char *name, const H5F_access_t *access_parms, uintn flags,
#ifdef H5Fmpio_DEBUG
/* Check for debug commands in the info parameter */
{ char debug_str[128];
- int infoerr, str_len, flag, i;
+ int infoerr, flag, i;
if (access_parms->u.mpio.info) {
infoerr = MPI_Info_get( access_parms->u.mpio.info,
H5F_MPIO_DEBUG_KEY, 127, debug_str, &flag );
- fprintf(stdout, "H5Fmpio debug flags=%s\n", debug_str );
- for (i=0; i<str_len; ++i)
- H5F_mpio_Debug[(int)debug_str[i]] = 1;
+ if (flag) {
+ fprintf(stdout, "H5Fmpio debug flags=%s\n", debug_str );
+ for (i=0;
+ debug_str[i]/*end of string*/ && i<128/*just in case*/;
+ ++i) {
+ H5F_mpio_Debug[(int)debug_str[i]] = 1;
+ }
+ }
}
}
#endif