recorder: Fix error reading multiple recorders from .bam file

Modified version of #1564 without changing ABI

Fixes #1561
This commit is contained in:
rdb 2023-12-10 13:18:47 +01:00
parent 4f37d97cf6
commit be958c409f
2 changed files with 4 additions and 8 deletions

View File

@ -228,11 +228,9 @@ make_from_bam(const FactoryParams &params) {
RecorderBase *MouseRecorder::
make_recorder(const FactoryParams &params) {
MouseRecorder *node = new MouseRecorder("");
DatagramIterator scan;
BamReader *manager;
BamReaderParam *param = DCAST(BamReaderParam, params.get_param(0));
parse_params(params, scan, manager);
node->fillin_recorder(scan, manager);
node->fillin_recorder((DatagramIterator &)param->get_iterator(), param->get_manager());
return node;
}

View File

@ -113,11 +113,9 @@ write_recorder(BamWriter *manager, Datagram &dg) {
RecorderBase *SocketStreamRecorder::
make_recorder(const FactoryParams &params) {
SocketStreamRecorder *node = new SocketStreamRecorder;
DatagramIterator scan;
BamReader *manager;
BamReaderParam *param = DCAST(BamReaderParam, params.get_param(0));
parse_params(params, scan, manager);
node->fillin_recorder(scan, manager);
node->fillin_recorder((DatagramIterator &)param->get_iterator(), param->get_manager());
return node;
}