H5G_stab_valid(H5O_loc_t *grp_oloc, hid_t dxpl_id, H5O_stab_t *alt_stab)
H5O_stab_t stab; /* Current symbol table */
H5HL_t *heap = NULL; /* Pointer to local heap */
hbool_t changed = FALSE; /* Whether stab has been modified */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5G_stab_valid, FAIL)
/* Read the symbol table message */
H5O_msg_read(grp_oloc, H5O_STAB_ID, &stab, dxpl_id);
if(NULL == H5O_msg_read(grp_oloc, H5O_STAB_ID, &stab, dxpl_id))
HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "unable to read symbol table message");
/* Check if the symbol table message's b-tree address is valid */
if(H5B_valid(grp_oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr) < 0) {
/* Address is invalid, try the b-tree address in the alternate symbol
if(!alt_stab || H5B_valid(grp_oloc->file, dxpl_id, H5B_SNODE, alt_stab->btree_addr) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "unable to locate b-tree")
/* The alternate symbol table's b-tree address is valid. Adjust the
* symbol table message in the group. */