From 7e48092cf0d658b29493fa843615c1f1b0b41e7e Mon Sep 17 00:00:00 2001 From: Reino Ruusu Date: Thu, 8 Nov 2018 16:46:44 +0200 Subject: [PATCH] Add calls to fmi termination functions to implementation of unloadFMU() gitlab #12 Linux build in a later commit. Change-Id: I731328a8088119059a3bf3775aec65e389f6f381 --- org.simantics.fmil.core/native/FMUSimulator/src/fmi_util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/org.simantics.fmil.core/native/FMUSimulator/src/fmi_util.c b/org.simantics.fmil.core/native/FMUSimulator/src/fmi_util.c index e91a6c4..4aed1e1 100644 --- a/org.simantics.fmil.core/native/FMUSimulator/src/fmi_util.c +++ b/org.simantics.fmil.core/native/FMUSimulator/src/fmi_util.c @@ -112,6 +112,7 @@ int FMI_CS_LOAD(const char *zipFilePath, const char *unzipFolder, void **fmuPoin int FMI1_CS_UNLOAD(void *fmu_, const char **error) { fmi1_import_t *fmu = (fmi1_import_t *)fmu_; + fmi1_import_terminate(fmu); fmi1_import_destroy_dllfmu(fmu); fmi1_import_free(fmu); return 0; @@ -119,6 +120,7 @@ int FMI1_CS_UNLOAD(void *fmu_, const char **error) { int FMI2_CS_UNLOAD(void *fmu_, const char **error) { fmi2_import_t *fmu = (fmi2_import_t *)fmu_; + fmi2_import_terminate(fmu); fmi2_import_destroy_dllfmu(fmu); fmi2_import_free(fmu); return 0; -- 2.47.1