summaryrefslogtreecommitdiffstats
path: root/src/H5Dvirtual.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2015-08-14 19:58:35 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2015-08-14 19:58:35 (GMT)
commit1eff550df3e20882f438b9fe54a34b2601041a31 (patch)
tree02544b102de1a1b38a06c2a28b2eb5434d007f57 /src/H5Dvirtual.c
parentcefda2ef0c51922a9ab925b0f28b0c2a24a8c050 (diff)
downloadhdf5-1eff550df3e20882f438b9fe54a34b2601041a31.zip
hdf5-1eff550df3e20882f438b9fe54a34b2601041a31.tar.gz
hdf5-1eff550df3e20882f438b9fe54a34b2601041a31.tar.bz2
[svn-r27506] H5Dset_extent no longer holds all printf source datasets open.
Other items identified during reviews. Tested: ummon
Diffstat (limited to 'src/H5Dvirtual.c')
-rw-r--r--src/H5Dvirtual.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c
index 40208fd..0d15685 100644
--- a/src/H5Dvirtual.c
+++ b/src/H5Dvirtual.c
@@ -1114,8 +1114,6 @@ H5D__virtual_copy_parsed_name(H5O_storage_virtual_name_seg_t **dst,
if(NULL == ((*p_dst)->name_segment = HDstrdup(p_src->name_segment)))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to duplicate name segment")
} /* end if */
- else
- (*p_dst)->name_segment = NULL;
/* Advance pointers */
p_src = p_src->next;
@@ -1463,9 +1461,16 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id)
if(H5D__virtual_open_source_dset(dset, &storage->list[i], &storage->list[i].sub_dset[j], dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset")
- /* Update first_missing */
- if(storage->list[i].sub_dset[j].dset)
+ if(storage->list[i].sub_dset[j].dset) {
+ /* Update first_missing */
first_missing = j + 1;
+
+ /* Close source dataset so we don't have huge
+ * numbers of datasets open */
+ if(H5D_close(storage->list[i].sub_dset[j].dset) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to close source dataset")
+ storage->list[i].sub_dset[j].dset = NULL;
+ } /* end if */
} /* end else */
} /* end for */