diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-11-26 23:39:37 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-01-09 20:58:04 -0800 |
commit | ec37c71f5eeb7d4b0c4b8719b52583fadb0b8f4c (patch) | |
tree | b1af183d2fb5c827e940591b90547390eb70c31b /core/uemis-downloader.c | |
parent | 7df8d8c888cb8e1cdb12a171a4715c8f5af7c80d (diff) | |
download | subsurface-ec37c71f5eeb7d4b0c4b8719b52583fadb0b8f4c.tar.gz |
Core: add trip_table parameter to trip-functions
Currently trips are added to the global trip table. If we want to
make dive-import undoable, we should be able to parse trips of a
log-file into a distinct table. Therefore, add a trip_table
parameter to
- insert_trip()
- create_and_hookup_trip_from_dive()
- autogroup_dives()
- unregister_trip()
- remove_dive_from_trip()
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/uemis-downloader.c')
-rw-r--r-- | core/uemis-downloader.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/uemis-downloader.c b/core/uemis-downloader.c index 0e7ed1f8b..5dd6567b6 100644 --- a/core/uemis-downloader.c +++ b/core/uemis-downloader.c @@ -215,7 +215,7 @@ static void record_uemis_dive(device_data_t *devdata, struct dive *dive) { if (devdata->create_new_trip) { if (!devdata->trip) - devdata->trip = create_and_hookup_trip_from_dive(dive); + devdata->trip = create_and_hookup_trip_from_dive(dive, &trip_table); else add_dive_to_trip(dive, devdata->trip); } @@ -859,7 +859,7 @@ static bool uemis_delete_dive(device_data_t *devdata, uint32_t diveid) if (dive) { devdata->download_table->dives[--devdata->download_table->nr] = NULL; if (dive->notrip) - remove_dive_from_trip(dive); + remove_dive_from_trip(dive, &trip_table); free(dive->dc.sample); free((void *)dive->notes); |