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>
This commit is contained in:
Berthold Stoeger 2020-10-18 23:42:17 +02:00 committed by Dirk Hohndel
parent 255f561aff
commit 8c65558b5c
6 changed files with 23 additions and 14 deletions

View file

@ -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);
}