TPM reset state if in entry zone
This commit is contained in:
parent
aacada4135
commit
7781ffe805
|
|
@ -112,10 +112,12 @@ int tpm_pay(void* fc, tolling_info_t* info, void* security_socket, uint8_t* neig
|
|||
switch (info->asn->tollType) {
|
||||
case TollType_entry:
|
||||
if (tolling->station.obu.toll_type != -1) {
|
||||
syslog_err("[facilities] [tolling] trying to issue entry.request but current tolling state is %s",
|
||||
syslog_err("[facilities] [tolling] trying to issue entry.request but current tolling state is %s - resetting",
|
||||
tts(tolling->station.obu.toll_type));
|
||||
rv = 1;
|
||||
goto cleanup;
|
||||
tolling->station.obu.toll_type = -1;
|
||||
tolling->station.obu.active = false;
|
||||
ASN_STRUCT_FREE(asn_DEF_TPM, tolling->station.obu.entry_proof);
|
||||
tolling->station.obu.entry_proof = NULL;
|
||||
}
|
||||
type->present = TollingType_PR_entry;
|
||||
type->choice.entry.present = TollingEntry_PR_request;
|
||||
|
|
|
|||
Loading…
Reference in New Issue