summaryrefslogtreecommitdiffstats
path: root/core/parse.c
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-10-18 23:42:17 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-10-24 09:51:37 -0700
commit8c65558b5c432c1d0e9c6af5939faa56ffecf51a (patch)
treeb7ded4867685f70849d687d465c1653d3955b499 /core/parse.c
parent255f561afffb26bae5c4de0c5fe2d60effb41103 (diff)
downloadsubsurface-8c65558b5c432c1d0e9c6af5939faa56ffecf51a.tar.gz
devices: create device nodes in parsers
So far, we added a non-global device table to the parser states. Now, create device nodes in that table instead of in the global table. Thus, on undo of dive-import, the new device nodes will be removed. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/parse.c')
-rw-r--r--core/parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/parse.c b/core/parse.c
index a1b906bfb..8de69e499 100644
--- a/core/parse.c
+++ b/core/parse.c
@@ -201,7 +201,7 @@ void dc_settings_start(struct parser_state *state)
void dc_settings_end(struct parser_state *state)
{
- create_device_node(&device_table, state->cur_settings.dc.model, state->cur_settings.dc.deviceid, state->cur_settings.dc.serial_nr,
+ create_device_node(state->devices, state->cur_settings.dc.model, state->cur_settings.dc.deviceid, state->cur_settings.dc.serial_nr,
state->cur_settings.dc.firmware, state->cur_settings.dc.nickname);
reset_dc_settings(state);
}