diff --git a/cwFlowCross.cpp b/cwFlowCross.cpp index de5c646..49c29f2 100644 --- a/cwFlowCross.cpp +++ b/cwFlowCross.cpp @@ -146,12 +146,17 @@ namespace cw net->deviceN = 0; net->stateId = net_idx == 0 ? kActiveStateId : kInactiveStateId; net->net_idx = net_idx; + + 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::create( net->flowH, &classCfg, &networkCfg, nullptr, nullptr, net->deviceA, deviceN )) == kOkRC ) + if((rc = flow::initialize( net->flowH, net->deviceA, deviceN )) == kOkRC ) net->deviceN = deviceN; 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; } diff --git a/cwFlowTest.cpp b/cwFlowTest.cpp index 30c4050..811f309 100644 --- a/cwFlowTest.cpp +++ b/cwFlowTest.cpp @@ -54,10 +54,17 @@ cw::rc_t cw::flow::test( const test::test_args_t& args ) // create the flow object if((rc = create( flowH, class_cfg, args.test_args, subnet_cfg, args.out_dir)) != kOkRC ) { - rc = cwLogError(rc,"Flow object create failed."); + 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."); + goto errLabel; + } + // run the network if((rc = exec( flowH )) != kOkRC ) rc = cwLogError(rc,"Execution failed.");