summaryrefslogtreecommitdiffstats
path: root/src/H5VLiod_client.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2013-05-13 19:02:31 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2013-05-13 19:02:31 (GMT)
commit8583f1c9e05f26c16f396f1977e2984af6b221ac (patch)
treea7b1afd079b037103e6c228834a7ee5048ec20b6 /src/H5VLiod_client.c
parentb697c0f3cdf2185aaccd73295775705ec141cf46 (diff)
downloadhdf5-8583f1c9e05f26c16f396f1977e2984af6b221ac.zip
hdf5-8583f1c9e05f26c16f396f1977e2984af6b221ac.tar.gz
hdf5-8583f1c9e05f26c16f396f1977e2984af6b221ac.tar.bz2
[svn-r23701] add error checking for open/create calls at client.
Diffstat (limited to 'src/H5VLiod_client.c')
-rw-r--r--src/H5VLiod_client.c53
1 files changed, 51 insertions, 2 deletions
diff --git a/src/H5VLiod_client.c b/src/H5VLiod_client.c
index 66c13c3..aa9283f 100644
--- a/src/H5VLiod_client.c
+++ b/src/H5VLiod_client.c
@@ -269,16 +269,65 @@ H5VL_iod_request_complete(H5VL_iod_file_t *file, H5VL_iod_request_t *req)
switch(req->type) {
case HG_FILE_CREATE:
case HG_FILE_OPEN:
+ if(IOD_OH_UNDEFINED == req->obj->file->remote_file.coh.cookie) {
+ fprintf(stderr, "failed to create/open file\n");
+ req->status = H5AO_FAILED;
+ req->state = H5VL_IOD_COMPLETED;
+ }
+ H5VL_iod_request_delete(file, req);
+ break;
case HG_ATTR_CREATE:
case HG_ATTR_OPEN:
+ {
+ H5VL_iod_attr_t *attr = (H5VL_iod_attr_t *)req->obj;
+
+ if(IOD_OH_UNDEFINED == attr->remote_attr.iod_oh.cookie) {
+ fprintf(stderr, "failed to create/open Attribute\n");
+ req->status = H5AO_FAILED;
+ req->state = H5VL_IOD_COMPLETED;
+ }
+ H5VL_iod_request_delete(file, req);
+ break;
+ }
case HG_GROUP_CREATE:
case HG_GROUP_OPEN:
+ {
+ H5VL_iod_group_t *group = (H5VL_iod_group_t *)req->obj;
+
+ if(IOD_OH_UNDEFINED == group->remote_group.iod_oh.cookie) {
+ fprintf(stderr, "failed to create/open Group\n");
+ req->status = H5AO_FAILED;
+ req->state = H5VL_IOD_COMPLETED;
+ }
+ H5VL_iod_request_delete(file, req);
+ break;
+ }
case HG_DSET_CREATE:
case HG_DSET_OPEN:
+ {
+ H5VL_iod_dset_t *dset = (H5VL_iod_dset_t *)req->obj;
+
+ if(IOD_OH_UNDEFINED == dset->remote_dset.iod_oh.cookie) {
+ fprintf(stderr, "failed to create/open Dataset\n");
+ req->status = H5AO_FAILED;
+ req->state = H5VL_IOD_COMPLETED;
+ }
+ H5VL_iod_request_delete(file, req);
+ break;
+ }
case HG_DTYPE_COMMIT:
case HG_DTYPE_OPEN:
- H5VL_iod_request_delete(file, req);
- break;
+ {
+ H5VL_iod_dtype_t *dtype = (H5VL_iod_dtype_t *)req->obj;
+
+ if(IOD_OH_UNDEFINED == dtype->remote_dtype.iod_oh.cookie) {
+ fprintf(stderr, "failed to create/open Attribute\n");
+ req->status = H5AO_FAILED;
+ req->state = H5VL_IOD_COMPLETED;
+ }
+ H5VL_iod_request_delete(file, req);
+ break;
+ }
case HG_DSET_WRITE:
case HG_DSET_READ:
{