From: Reino Ruusu Date: Thu, 8 Nov 2018 14:46:44 +0000 (+0200) Subject: Add calls to fmi termination functions to implementation of unloadFMU() X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=7e48092cf0d658b29493fa843615c1f1b0b41e7e;p=simantics%2Ffmil.git Add calls to fmi termination functions to implementation of unloadFMU() gitlab #12 Linux build in a later commit. Change-Id: I731328a8088119059a3bf3775aec65e389f6f381 --- 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;