mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-12-09 08:11:38 +08:00
Merge pull request #2827 from lostbard/octave-fix-2617
Add H5FD_http_finalize function and call on hdf5 finalize
This commit is contained in:
commit
98365988c8
@ -239,6 +239,31 @@ H5FD_http_init(void)
|
||||
return H5FD_HTTP_g;
|
||||
} /* end H5FD_http_init() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5FD_http_finalize
|
||||
*
|
||||
* Purpose: Free this driver by unregistering the driver with the
|
||||
* library.
|
||||
*
|
||||
* Returns: Non-negative on success or negative on failure
|
||||
*
|
||||
* Programmer: John Donoghue
|
||||
* Tuesday, December 12, 2023
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
EXTERNL hid_t
|
||||
H5FD_http_finalize(void)
|
||||
{
|
||||
/* Reset VFL ID */
|
||||
if (H5FD_HTTP_g)
|
||||
H5FDunregister(H5FD_HTTP_g);
|
||||
H5FD_HTTP_g = 0;
|
||||
|
||||
return H5FD_HTTP_g;
|
||||
} /* end H5FD_http_finalize() */
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
* Function: H5FD_http_term
|
||||
@ -256,9 +281,6 @@ H5FD_http_init(void)
|
||||
static herr_t
|
||||
H5FD_http_term(void)
|
||||
{
|
||||
/* Reset VFL ID */
|
||||
H5FD_HTTP_g = 0;
|
||||
|
||||
return 0;
|
||||
} /* end H5FD_http_term() */
|
||||
#endif
|
||||
|
@ -44,9 +44,11 @@ extern "C" {
|
||||
|
||||
#if 0
|
||||
H5_DLL hid_t H5FD_http_init(void);
|
||||
H5_DLL hid_t H5FD_http_finalize(void);
|
||||
H5_DLL herr_t H5Pset_fapl_http(hid_t fapl_id);
|
||||
#else
|
||||
EXTERNL hid_t H5FD_http_init(void);
|
||||
EXTERNL hid_t H5FD_http_finalize(void);
|
||||
EXTERNL herr_t H5Pset_fapl_http(hid_t fapl_id);
|
||||
#endif
|
||||
|
||||
|
@ -142,6 +142,9 @@ NC_HDF5_initialize(void)
|
||||
int
|
||||
NC_HDF5_finalize(void)
|
||||
{
|
||||
#ifdef ENABLE_BYTERANGE
|
||||
(void)H5FD_http_finalize();
|
||||
#endif
|
||||
(void)nc4_hdf5_finalize();
|
||||
return NC_NOERR;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user