diff --git a/src/tpm.c b/src/tpm.c index bd439a5..da4d720 100644 --- a/src/tpm.c +++ b/src/tpm.c @@ -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;