]> gerrit.simantics Code Review - simantics/fmil.git/commitdiff
Add calls to fmi termination functions to implementation of unloadFMU() 39/2439/3
authorReino Ruusu <reino.ruusu@semantum.fi>
Thu, 8 Nov 2018 14:46:44 +0000 (16:46 +0200)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Wed, 21 Nov 2018 09:58:51 +0000 (09:58 +0000)
gitlab #12

Linux build in a later commit.

Change-Id: I731328a8088119059a3bf3775aec65e389f6f381

org.simantics.fmil.core/native/FMUSimulator/src/fmi_util.c

index e91a6c4f70c133dbe2797b3a6b49cc5ba1961a76..4aed1e15a9ea68c6059f2b7a49ee2d703990b798 100644 (file)
@@ -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;