diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2002-11-12 13:57:25 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2002-11-12 13:57:25 (GMT) |
commit | 10fb09658676e19e89a4fd0377fb9e5d0da35cdb (patch) | |
tree | 2dffe3025c4b69f64c2140b43025caf52fd65c5f /src/H5FPclient.c | |
parent | fac0c1327142486041080e47282f875d64cad740 (diff) | |
download | hdf5-10fb09658676e19e89a4fd0377fb9e5d0da35cdb.zip hdf5-10fb09658676e19e89a4fd0377fb9e5d0da35cdb.tar.gz hdf5-10fb09658676e19e89a4fd0377fb9e5d0da35cdb.tar.bz2 |
[svn-r6077] Purpose:
Code cleanup
Description:
Added some comments and made some minor code cleanups
Platforms tested:
minor change, only testing on FreeBSD 4.7 (sleipnir) w/parallel
Diffstat (limited to 'src/H5FPclient.c')
-rw-r--r-- | src/H5FPclient.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/H5FPclient.c b/src/H5FPclient.c index 1d80514..613f780 100644 --- a/src/H5FPclient.c +++ b/src/H5FPclient.c @@ -21,7 +21,6 @@ #include "H5MMprivate.h" /* Memory allocation */ #include "H5Oprivate.h" /* Object Headers */ #include "H5Spkg.h" /* Dataspace functions */ -#include "H5Sprivate.h" /* Dataspaces */ #include "H5TBprivate.h" /* Threaded, Balanced, Binary Trees */ #ifdef H5_HAVE_FPHDF5 @@ -169,7 +168,15 @@ H5FP_request_lock(unsigned int sap_file_id, unsigned char *obj_oid, * error stack...The same with the lock release below. * -BW */ - HGOTO_DONE(FAIL); + /* FIXME: Yes, but that's like saying that failing to open a + * file 'is not an "error" per se' and letting the code + * deal with it in the next layer up. Currently, + * pretty much everywhere in the code assumes that when + * a function fails, it pushes a reason on the error + * stack. Changed to return error in lock release + * function also. - QAK + */ + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTLOCK, FAIL, "can't lock object on server"); } done: @@ -236,11 +243,8 @@ H5FP_request_release_lock(unsigned int sap_file_id, unsigned char *obj_oid, *status = sap_reply.status; - if (sap_reply.status != H5FP_STATUS_LOCK_RELEASED) { - HDfprintf(stderr, "Release: For some reason, we couldn't release the lock\n"); - HDfprintf(stderr, "Release: reply status == %d\n", sap_reply.status); - HGOTO_DONE(FAIL); - } + if (sap_reply.status != H5FP_STATUS_LOCK_RELEASED) + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTUNLOCK, FAIL, "can't unlock object on server"); } done: |