[svn-r12831] Changed the API for "unpacking" an external link value to take the size of

the linkval buffer, per Elena and Frank's suggestions while revising
the documentation.  Added error checking using this size, as well as a
couple of tests.

Tested on juniper, kagiso, and sol.
This commit is contained in:
James Laird
2006-10-30 15:24:19 -05:00
parent 780fefb829
commit c19a43d854
8 changed files with 56 additions and 25 deletions

View File

@@ -1560,7 +1560,7 @@ dump_all(hid_t group, const char *name, void * op_data)
d_status = EXIT_FAILURE;
ret = FAIL;
} else {
if(H5Lunpack_elink_val(targbuf, &filename, &targname) < 0) {
if(H5Lunpack_elink_val(targbuf, statbuf.linklen, &filename, &targname) < 0) {
error_msg(progname, "unable to unpack external link value\n");
d_status = EXIT_FAILURE;
ret = FAIL;
@@ -3248,7 +3248,7 @@ handle_links(hid_t fid, char *links, void UNUSED * data)
begin_obj(dump_header_format->extlinkbegin, links,
dump_header_format->extlinkblockbegin);
if (H5Lget_linkval(fid, links, statbuf.linklen, buf, H5P_DEFAULT) >= 0) {
if(H5Lunpack_elink_val(buf, &elink_file, &elink_path)>=0) {
if(H5Lunpack_elink_val(buf, statbuf.linklen, &elink_file, &elink_path)>=0) {
indentation(COL);
printf("LINKCLASS %d\n", linfo.type);
indentation(COL);