summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/H5E.c2
-rw-r--r--src/H5Epublic.h2
-rw-r--r--src/H5FPclient.c18
3 files changed, 15 insertions, 7 deletions
diff --git a/src/H5E.c b/src/H5E.c
index 321a58b..260ab1c 100644
--- a/src/H5E.c
+++ b/src/H5E.c
@@ -89,6 +89,8 @@ static const H5E_minor_mesg_t H5E_minor_mesg_g[] = {
{H5E_CANTCOPY, "Unable to copy object"},
{H5E_CANTFREE, "Unable to free object"},
{H5E_ALREADYEXISTS, "Object already exists"},
+ {H5E_CANTLOCK, "Unable to lock object"},
+ {H5E_CANTUNLOCK, "Unable to unlock object"},
/* File accessability errors */
{H5E_FILEEXISTS, "File already exists"},
diff --git a/src/H5Epublic.h b/src/H5Epublic.h
index ef44f3a..014ff32 100644
--- a/src/H5Epublic.h
+++ b/src/H5Epublic.h
@@ -120,6 +120,8 @@ typedef enum H5E_minor_t {
H5E_CANTCOPY, /*unable to copy object */
H5E_CANTFREE, /*unable to free object */
H5E_ALREADYEXISTS, /*Object already exists */
+ H5E_CANTLOCK, /*Unable to lock object */
+ H5E_CANTUNLOCK, /*Unable to unlock object */
/* File accessability errors */
H5E_FILEEXISTS, /*file already exists */
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: