Fix if VCM.req is for self
This commit is contained in:
parent
7308232b61
commit
fe77c73492
11
src/vcm.c
11
src/vcm.c
|
|
@ -384,11 +384,6 @@ static int vcm_check_handle_request(VCM_t* vcm, mc_neighbour_s* neighbour) {
|
|||
|
||||
uint64_t now = itss_time_get();
|
||||
|
||||
if (coordination->session.own_req && now < coordination->session.ts + MC_RESOLUTION_TIMEOUT) { /* in maneuver */
|
||||
log_debug("[vc] rejecting VCM from %d - currently in maneuver", vcm->header.stationID);
|
||||
vcm_reject(vcm, neighbour);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Is request for me?
|
||||
CoordinationRequest_t* request = &vcm->vcm.maneuverContainer.choice.vehicle.negotiation->choice.request;
|
||||
|
|
@ -410,6 +405,12 @@ static int vcm_check_handle_request(VCM_t* vcm, mc_neighbour_s* neighbour) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (coordination->session.own_req && now < coordination->session.ts + MC_RESOLUTION_TIMEOUT) { /* in maneuver */
|
||||
log_debug("[vc] rejecting VCM from %d - currently in maneuver", vcm->header.stationID);
|
||||
vcm_reject(vcm, neighbour);
|
||||
return 1;
|
||||
}
|
||||
|
||||
const ssize_t buf_len = 512;
|
||||
uint8_t buf1[buf_len], buf2[buf_len];
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue