From f6e7bdc5ef99d5a5fe71ac4f32511900fa82e804 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Tue, 26 Feb 2019 22:26:11 +0100 Subject: Dive site: add dive site table parameter to dive site functions To enable undo of dive site functions, it is crucial to work with different dive site tables. Therefore add a dive site table parameter to dive site functions. For now, always pass the global dive site table. Thus, this commit shouldn't alter any functionality. After this change, a simple search for dive_site_table reveals all places where the global dive site table is accessed. Signed-off-by: Berthold Stoeger --- smtk-import/smartrak.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'smtk-import/smartrak.c') diff --git a/smtk-import/smartrak.c b/smtk-import/smartrak.c index 8ef01de48..b33afb43c 100644 --- a/smtk-import/smartrak.c +++ b/smtk-import/smartrak.c @@ -373,12 +373,12 @@ static void smtk_build_location(MdbHandle *mdb, char *idx, timestamp_t when, str str = smtk_concat_str(str, ", ", "%s", col[1]->bind_ptr); // Locality str = smtk_concat_str(str, ", ", "%s", site); - ds = get_dive_site_by_name(str); + ds = get_dive_site_by_name(str, &dive_site_table); if (!ds) { if (!has_location(&loc)) - ds = create_dive_site(str, when); + ds = create_dive_site(str, when, &dive_site_table); else - ds = create_dive_site_with_gps(str, &loc, when); + ds = create_dive_site_with_gps(str, &loc, when, &dive_site_table); } *location = ds; smtk_free(bound_values, table->num_cols); -- cgit v1.2.3-70-g09d2