summaryrefslogtreecommitdiffstats
path: root/src/H5VLiod_client.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2013-04-22 18:25:47 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2013-04-22 18:25:47 (GMT)
commit898033f75c7ba67b502514da459e57a2c8f6e528 (patch)
treeb72ae7ab1ffbe97720f9602021c5eaa470674764 /src/H5VLiod_client.c
parent3c737ee83ed7da73741cf68eee915feecfae1fa8 (diff)
downloadhdf5-898033f75c7ba67b502514da459e57a2c8f6e528.zip
hdf5-898033f75c7ba67b502514da459e57a2c8f6e528.tar.gz
hdf5-898033f75c7ba67b502514da459e57a2c8f6e528.tar.bz2
[svn-r23606] add support for named datatypes in the IOD plugin:
- H5Topen_ff is still implemented synchronously because the async implementation will be very ugly. It's better to think of a better way to implement asynchronously. add a native backend to the server: - Enabling this enforces that create calls are independent for now, since we are not just printfing at the server anymore.
Diffstat (limited to 'src/H5VLiod_client.c')
-rw-r--r--src/H5VLiod_client.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/H5VLiod_client.c b/src/H5VLiod_client.c
index 51e008d..ac906e1 100644
--- a/src/H5VLiod_client.c
+++ b/src/H5VLiod_client.c
@@ -37,6 +37,7 @@
H5FL_EXTERN(H5VL_iod_file_t);
H5FL_EXTERN(H5VL_iod_group_t);
H5FL_EXTERN(H5VL_iod_dset_t);
+H5FL_EXTERN(H5VL_iod_dtype_t);
herr_t
H5VL_iod_request_add(H5VL_iod_file_t *file, H5VL_iod_request_t *request)
@@ -271,6 +272,8 @@ H5VL_iod_request_complete(H5VL_iod_file_t *file, H5VL_iod_request_t *req)
case HG_GROUP_OPEN:
case HG_DSET_CREATE:
case HG_DSET_OPEN:
+ case HG_DTYPE_COMMIT:
+ case HG_DTYPE_OPEN:
H5VL_iod_request_delete(file, req);
break;
case HG_DSET_WRITE:
@@ -418,6 +421,32 @@ H5VL_iod_request_complete(H5VL_iod_file_t *file, H5VL_iod_request_t *req)
dset = H5FL_FREE(H5VL_iod_dset_t, dset);
break;
}
+ case HG_DTYPE_CLOSE:
+ {
+ int *status = (int *)req->data;
+ H5VL_iod_dtype_t *dtype = (H5VL_iod_dtype_t *)req->obj;
+
+ if(SUCCEED != *status)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTDEC, FAIL, "dtype close failed at the server");
+
+ free(status);
+ req->data = NULL;
+ dtype->common.request = NULL;
+ H5VL_iod_request_delete(file, req);
+
+ /* free dtype components */
+ free(dtype->common.obj_name);
+ if(dtype->remote_dtype.tcpl_id != H5P_DATATYPE_CREATE_DEFAULT &&
+ H5Pclose(dtype->remote_dtype.tcpl_id) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "failed to close plist");
+ if(dtype->tapl_id != H5P_DATATYPE_ACCESS_DEFAULT &&
+ H5Pclose(dtype->tapl_id) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "failed to close plist");
+ if(H5Tclose(dtype->remote_dtype.type_id) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "failed to close dtype");
+ dtype = H5FL_FREE(H5VL_iod_dtype_t, dtype);
+ break;
+ }
default:
H5VL_iod_request_delete(file, req);
HGOTO_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "Request Type not supported");