summaryrefslogtreecommitdiffstats
path: root/src/H5O.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-10-14 19:35:08 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-10-14 19:35:08 (GMT)
commitcfb2a264f1a441c4267c9d6095a4f11744a602f2 (patch)
tree06613f81286b01a4d27ea420d432f6c5400b6e08 /src/H5O.c
parent6f9a11d046688e5b178fe96e70ea9b1569fc3856 (diff)
downloadhdf5-cfb2a264f1a441c4267c9d6095a4f11744a602f2.zip
hdf5-cfb2a264f1a441c4267c9d6095a4f11744a602f2.tar.gz
hdf5-cfb2a264f1a441c4267c9d6095a4f11744a602f2.tar.bz2
[svn-r761] Changes since 19981013
---------------------- ./src/H5.c Fixed a signed vs. unsigned comparison. ./src/H5D.c Setting a fill value of all zeros will cause the fill value to be written to the dataset instead of relying on the low-level file driver initializing unwritten areas with zero. ./src/H5D.c ./src/H5F.c ./src/H5Fprivate.h ./src/H5G.c ./src/H5Gpkg.h ./src/H5Gprivate.h ./src/H5O.c ./src/H5T.c More file mounting stuff. ./src/H5I.c Fixed a bug where trying to close an invalid object id caused a core dump. For instance, H5Gclose(-1). ./MANIFEST ./test/Makefile.in ./test/mount.c [NEW] Mounting tests. ./src/H5R.c Fixed a couple (herr_t)NULL casts.
Diffstat (limited to 'src/H5O.c')
-rw-r--r--src/H5O.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/H5O.c b/src/H5O.c
index 233d7f5..4386962 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -244,7 +244,7 @@ H5O_open(H5G_entry_t *obj_ent)
#endif
/* Increment open-lock counters */
- obj_ent->file->nopen++;
+ obj_ent->file->nopen_objs++;
FUNC_LEAVE(SUCCEED);
}
@@ -273,16 +273,16 @@ H5O_close(H5G_entry_t *obj_ent)
/* Check args */
assert(obj_ent);
assert(obj_ent->file);
- assert(obj_ent->file->nopen > 0);
+ assert(obj_ent->file->nopen_objs > 0);
/* Decrement open-lock counters */
- --obj_ent->file->nopen;
+ --obj_ent->file->nopen_objs;
/*
* If the file open-lock count has reached zero and the file has a close
* pending then close the file.
*/
- if (0 == obj_ent->file->nopen && obj_ent->file->close_pending) {
+ if (0 == obj_ent->file->nopen_objs && obj_ent->file->close_pending) {
H5F_close(obj_ent->file);
}
#ifdef H5O_DEBUG
@@ -1203,8 +1203,14 @@ H5O_modify(H5G_entry_t *ent, const H5O_class_t *type, intn overwrite,
} else {
/*
* The shared message is stored in some other object header.
- * Increment the reference count on that object header.
+ * The other object header must be in the same file as the
+ * new object header. Increment the reference count on that
+ * object header.
*/
+ if (sh_mesg->u.ent.file->shared != ent->file->shared) {
+ HGOTO_ERROR(H5E_OHDR, H5E_LINK, FAIL,
+ "interfile hard links are not allowed");
+ }
if (H5O_link (&(sh_mesg->u.ent), 1)<0) {
HGOTO_ERROR (H5E_OHDR, H5E_LINK, FAIL,
"unable to adjust shared object link count");