cwFlowCross.cpp,cwFlowTest.cpp : Split flow::create() into flow::create() and flow::initialize().
This commit is contained in:
parent
607447e84c
commit
674885d7e4
@ -147,11 +147,16 @@ namespace cw
|
|||||||
net->stateId = net_idx == 0 ? kActiveStateId : kInactiveStateId;
|
net->stateId = net_idx == 0 ? kActiveStateId : kInactiveStateId;
|
||||||
net->net_idx = net_idx;
|
net->net_idx = net_idx;
|
||||||
|
|
||||||
if((rc = flow::create( net->flowH, &classCfg, &networkCfg, nullptr, nullptr, net->deviceA, deviceN )) == kOkRC )
|
if((rc = flow::create( net->flowH, &classCfg, &networkCfg, nullptr, nullptr )) == kOkRC )
|
||||||
|
{
|
||||||
|
rc = cwLogError(rc,"Flow cross index %i network create failed.",net_idx);
|
||||||
|
}
|
||||||
|
|
||||||
|
if((rc = flow::initialize( net->flowH, net->deviceA, deviceN )) == kOkRC )
|
||||||
net->deviceN = deviceN;
|
net->deviceN = deviceN;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cwLogError(rc,"Flow cross index %i network created failed.",net_idx);
|
cwLogError(rc,"Flow cross index %i network initialize failed.",net_idx);
|
||||||
goto errLabel;
|
goto errLabel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,6 +53,13 @@ cw::rc_t cw::flow::test( const test::test_args_t& args )
|
|||||||
|
|
||||||
// create the flow object
|
// create the flow object
|
||||||
if((rc = create( flowH, class_cfg, args.test_args, subnet_cfg, args.out_dir)) != kOkRC )
|
if((rc = create( flowH, class_cfg, args.test_args, subnet_cfg, args.out_dir)) != kOkRC )
|
||||||
|
{
|
||||||
|
rc = cwLogError(rc,"Flow object configure failed.");
|
||||||
|
goto errLabel;
|
||||||
|
}
|
||||||
|
|
||||||
|
// create the flow object
|
||||||
|
if((rc = initialize( flowH )) != kOkRC )
|
||||||
{
|
{
|
||||||
rc = cwLogError(rc,"Flow object create failed.");
|
rc = cwLogError(rc,"Flow object create failed.");
|
||||||
goto errLabel;
|
goto errLabel;
|
||||||
|
Loading…
Reference in New Issue
Block a user