diff options
author | Peter Cao <xcao@hdfgroup.org> | 2007-05-30 21:35:57 (GMT) |
---|---|---|
committer | Peter Cao <xcao@hdfgroup.org> | 2007-05-30 21:35:57 (GMT) |
commit | 461b896779cb585cf47236cdcfc271a98d3ca080 (patch) | |
tree | 9ad39b91c1b22826d0281ea8d916abaac5f03b5f /src/H5Oattr.c | |
parent | 7afc8fc6ebaaedf4d077b8ca1558e6bac8afc373 (diff) | |
download | hdf5-461b896779cb585cf47236cdcfc271a98d3ca080.zip hdf5-461b896779cb585cf47236cdcfc271a98d3ca080.tar.gz hdf5-461b896779cb585cf47236cdcfc271a98d3ca080.tar.bz2 |
[svn-r13821]
Fixed a bug at copying shared reg_ref attribute. The ref values of an attribute
was not writen in file. The post_copy_file() at H5Oattr.c only updates the value
in memory.
To fix the problem, we added H5O_shared_post_copy_file(), which delete the attribute
in file (with the incorrect value) and create an new attribute with the correct values.
I added the following functions:
H5Oshared.c:H5O_shared_post_copy_file(H5F_t *f, hid_t dxpl_id, H5O_t *oh, void *mesg);
H5Oshared.h: H5O_SHARED_POST_COPY_FILE
and modified the following files to include shared_post_copy_file()
H5Oattr.c
H5Odtype.c
H5Ofill.c
H5Opline.c
H5Osdspace.c
Diffstat (limited to 'src/H5Oattr.c')
-rw-r--r-- | src/H5Oattr.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/H5Oattr.c b/src/H5Oattr.c index 9c6daee..29c4abd 100644 --- a/src/H5Oattr.c +++ b/src/H5Oattr.c @@ -61,6 +61,8 @@ static herr_t H5O_attr_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, #define H5O_SHARED_LINK_REAL H5O_attr_link #define H5O_SHARED_COPY_FILE H5O_attr_shared_copy_file #define H5O_SHARED_COPY_FILE_REAL H5O_attr_copy_file +#define H5O_SHARED_POST_COPY_FILE H5O_attr_shared_post_copy_file +#define H5O_SHARED_POST_COPY_FILE_REAL H5O_attr_post_copy_file #define H5O_SHARED_DEBUG H5O_attr_shared_debug #define H5O_SHARED_DEBUG_REAL H5O_attr_debug #include "H5Oshared.h" /* Shared Object Header Message Callbacks */ @@ -83,7 +85,7 @@ const H5O_msg_class_t H5O_MSG_ATTR[1] = {{ NULL, /*can share method */ H5O_attr_pre_copy_file, /* pre copy native value to file */ H5O_attr_shared_copy_file, /* copy native value to file */ - H5O_attr_post_copy_file, /* post copy native value to file */ + H5O_attr_shared_post_copy_file, /* post copy native value to file */ H5O_attr_get_crt_index, /* get creation index */ H5O_attr_set_crt_index, /* set creation index */ H5O_attr_shared_debug /* debug the message */ @@ -958,6 +960,7 @@ H5O_attr_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src, HDassert(attr_dst); HDassert(file_dst); + /* Only need to fix reference attribute with real data being copied to * another file. */ |