[svn-r11490] Purpose:

Bug fix

Description:
    Fix "double root open" bug and apply same fix to datasets & named datatypes.

    Also fix bug in symbol table entry lookup code that would "transfer" an
object from one file handle to another file handle when the two file handles
were opened on the same actual file.

Platforms tested:
    FreeBSD 4.11 (sleipnir)
    Too minor to require h5committest
This commit is contained in:
Quincey Koziol
2005-10-03 00:50:05 -05:00
parent c13178a42d
commit e21f821fc3
11 changed files with 555 additions and 17 deletions

View File

@@ -996,6 +996,13 @@ H5G_node_found(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void UNUSED *_lt_key
if (H5G_ent_copy(udata->ent, &sn->entry[idx], H5G_COPY_NULL)<0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to copy entry");
/* Leave object in same file as lookup occurs in */
/* If a file is opened through different H5Fopen() calls, the symbol
* table entry from the B-tree lookup ("&sn->entry[idx]" above) will be
* in the "first" file, but the lookup might occur in the second file. - QAK
*/
udata->ent->file = f;
done:
if (sn && H5AC_unprotect(f, dxpl_id, H5AC_SNODE, addr, sn, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to release symbol table node");