diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-04-23 23:32:42 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-04-24 10:40:12 -0700 |
commit | 17526ded58703064dedebdf53669e12f0ab4f43e (patch) | |
tree | ee7f16edfa84884db388f55546ae8b75f2f9ad97 /core/device.h | |
parent | 52f93ea32661e25ee55206a1e452ef73a0aff3db (diff) | |
download | subsurface-17526ded58703064dedebdf53669e12f0ab4f43e.tar.gz |
cleanup: move clearing of device nodes to clear_dive_file_data()
It makes no sense to keep the device nodes if all the other data
is cleared. Let's do this automatically and not explicitly.
This ensures that the function is also called on mobile.
Currently it was only called on desktop.
Weirdly, the parser-tests were expecting that the device nodes
were not reset by clear_dive_file_data() and therefore divecomputers
were accumulating in the test results. Thus, the additional
computers had to be removed from the expected test results.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/device.h')
-rw-r--r-- | core/device.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/device.h b/core/device.h index c1e767bee..65b715ba1 100644 --- a/core/device.h +++ b/core/device.h @@ -14,6 +14,7 @@ extern void set_dc_deviceid(struct divecomputer *dc, unsigned int deviceid); extern void create_device_node(const char *model, uint32_t deviceid, const char *serial, const char *firmware, const char *nickname); extern void call_for_each_dc(void *f, void (*callback)(void *, const char *, uint32_t, const char *, const char *, const char *), bool select_only); +extern void clear_device_nodes(); #ifdef __cplusplus } |