summaryrefslogtreecommitdiffstats
path: root/core/libdivecomputer.c
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-01-10 17:00:39 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-01-19 13:48:17 -0800
commit11d19abc7412b76c9ee1be39ffe992afb02b710b (patch)
treee487a21e6d194174423ed7301d7e6d3455e88012 /core/libdivecomputer.c
parent239e6f237f356eb2bf31105b7a7b86712344d075 (diff)
downloadsubsurface-11d19abc7412b76c9ee1be39ffe992afb02b710b.tar.gz
Dive download: add trip_table to device_data_t
Since recent commits, dive-trips are not added directly to the core, but into separate trip tables (see ec37c71f5eeb7d4b0c4b8719b52583fadb0b8f4c). These commits did not finish the work for the download-from-dc case. Add an extra trip_table field to device_data_t. If trips are created (user selected "Download into new trip"), the trip will be created in that table. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/libdivecomputer.c')
-rw-r--r--core/libdivecomputer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/libdivecomputer.c b/core/libdivecomputer.c
index 47c769275..15dd1132a 100644
--- a/core/libdivecomputer.c
+++ b/core/libdivecomputer.c
@@ -826,7 +826,7 @@ static int dive_cb(const unsigned char *data, unsigned int size,
if (devdata->create_new_trip) {
if (!devdata->trip)
- devdata->trip = create_and_hookup_trip_from_dive(dive, &trip_table);
+ devdata->trip = create_and_hookup_trip_from_dive(dive, devdata->trip_table);
else
add_dive_to_trip(dive, devdata->trip);
}