Skip to content

Commit

Permalink
amarisoft: fix parameters setup for start_func2 if trx_set_start_para…
Browse files Browse the repository at this point in the history
…ms was not called.

Fixes crashing with amarisoft-2023-12-15, it's API did not had trx_set_start_params.
  • Loading branch information
rjonaitis committed Aug 13, 2024
1 parent aece542 commit 9f4372e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions plugins/amarisoft-plugin/trx_limesuite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,13 @@ static int limesuiteng_trx_start_func(TRXState* s1, const TRXDriverParams* param
static int limesuiteng_trx_start_func2(TRXState* s1, const TRXDriverParams2* params)
{
LimePluginContext* lime = static_cast<LimePluginContext*>(s1->opaque);
// params can be NULL if trx_set_start_params() was called before.
if (params != NULL)
{
int ret = limesuiteng_trx_set_start_params(s1, params);
if (ret != 0)
return ret;
}
return LimePlugin_Start(lime);
}

Expand Down

0 comments on commit 9f4372e

Please sign in to comment.