From 7308232b61561d47e33582bb0c53509b18fcc2ee Mon Sep 17 00:00:00 2001 From: emanuel Date: Thu, 2 Feb 2023 12:09:28 +0000 Subject: [PATCH] Prematurely close session when commit received --- src/vcm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/vcm.c b/src/vcm.c index 08f8319..7c1a42b 100644 --- a/src/vcm.c +++ b/src/vcm.c @@ -922,7 +922,13 @@ static void intersection_check(VCM_t* vcm, mc_neighbour_s* neighbour) { } static int vcm_check_handle_commit(VCM_t* vcm, mc_neighbour_s* neighbour) { - coordination_t* coo = &facilities.coordination; + coordination_t* coordination = &facilities.coordination; + + if (vcm->vcm.maneuverContainer.choice.vehicle.negotiation->choice.commit.nonce != coordination->session.nonce) { + return 1; + } + + session_cleanup(); return 0; }