aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/file.c5
-rw-r--r--core/file.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/core/file.c b/core/file.c
index ba2956d60..59d00badb 100644
--- a/core/file.c
+++ b/core/file.c
@@ -534,8 +534,9 @@ int parse_file(const char *filename)
/* DataTrak/Wlog */
if (fmt && !strcasecmp(fmt + 1, "LOG")) {
- datatrak_import(filename, &dive_table);
- return 0;
+ ret = datatrak_import(&mem, &dive_table);
+ free(mem.buffer);
+ return ret;
}
/* OSTCtools */
diff --git a/core/file.h b/core/file.h
index 8c5647ed2..423d471f9 100644
--- a/core/file.h
+++ b/core/file.h
@@ -9,7 +9,7 @@ struct memblock {
extern int try_to_open_cochran(const char *filename, struct memblock *mem);
extern int try_to_open_liquivision(const char *filename, struct memblock *mem);
-extern void datatrak_import(const char *file, struct dive_table *table);
+extern int datatrak_import(struct memblock *mem, struct dive_table *table);
extern void ostctools_import(const char *file, struct dive_table *table);
#ifdef __cplusplus