Ejemplo n.º 1
0
/**
 * Close a storage object opened by rmsdb_record_store_open. Does no block.
 *
 * If not successful *ppszError will set to point to an error string,
 * on success it will be set to NULL.
 *
 * @param ppszError where to put an I/O error
 * @param handle handle to record store storage
 *
 */
void
recordStoreClose(char** ppszError, int handle) {

    midp_file_cache_close(ppszError, handle);
    /*
     * Verify that there is no error in closing the file. In case of any errors
     * there is no need to remove the node from the linked list
     */
     if (*ppszError != NULL) {
         return;
    }

    /*
     * Search the node based on handle. Delete the node upon file close
     */

     recordStoreDeleteLock(handle);
}
Ejemplo n.º 2
0
/**
 * Close a storage object opened by rmsdb_record_store_open. Does no block.
 *
 * If not successful *ppszError will set to point to an error string,
 * on success it will be set to NULL.
 *
 * @param ppszError where to put an I/O error
 * @param handle handle to record store storage
 *
 */
void
recordStoreClose(char** ppszError, int handle) {

    midp_file_cache_close(ppszError, handle);
    /*
     * Verify that there is no error in closing the file. In case of any errors
     * there is no need to remove the node from the linked list
     */
     if (*ppszError != NULL) {
         return;
    }

#if ENABLE_RECORDSTORE_FILE_LOCK
    /*
     * Search the node based on handle. Delete the node upon file close
     */

     rmsdb_delete_file_lock(handle);
#endif     
}