Browse Source

[vm.c,vm_asmtch.c] Move match result PUSH to Bgp_VmStoreMsgTypeMatch()

master
Lorenzo Cogotti 1 year ago
parent
commit
739f798d11
  1. 4
      lonetix/bgp/vm.c
  2. 2
      lonetix/bgp/vm_asmtch.c

4
lonetix/bgp/vm.c

@ -331,6 +331,8 @@ cant_run:
Judgement Bgp_VmStoreMsgTypeMatch(Bgpvm *vm, Boolean isMatching)
{
BGP_VMPUSH(vm, isMatching);
vm->curMatch = (Bgpvmmatch *) Bgp_VmTempAlloc(vm, sizeof(*vm->curMatch));
if (!vm->curMatch) UNLIKELY
return NG;
@ -462,8 +464,6 @@ void Bgp_VmDoChkt(Bgpvm *vm, BgpType type)
return;
Boolean isMatching = (BGP_VMCHKMSGTYPE(vm, type) != NULL);
BGP_VMPUSH(vm, isMatching);
Bgp_VmStoreMsgTypeMatch(vm, isMatching);
}

2
lonetix/bgp/vm_asmtch.c

@ -766,7 +766,6 @@ void Bgp_VmDoAsmtch(Bgpvm *vm)
}
if (!BGP_VMCHKMSGTYPE(vm, BGP_UPDATE)) {
Bgp_VmStoreMsgTypeMatch(vm, /*isMatching=*/FALSE);
BGP_VMPUSH(vm, FALSE);
return;
}
@ -821,7 +820,6 @@ void Bgp_VmDoFasmtc(Bgpvm *vm)
}
if (!BGP_VMCHKMSGTYPE(vm, BGP_UPDATE)) {
Bgp_VmStoreMsgTypeMatch(vm, /*isMatching=*/FALSE);
BGP_VMPUSH(vm, FALSE);
return;
}

Loading…
Cancel
Save