Fix race condition.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos 2023-03-14 09:57:50 +01:00
parent be03298832
commit ec9eb7c436
No known key found for this signature in database
GPG key ID: C0095B7870A4CCD3

View file

@ -224,7 +224,7 @@ int driver_process_usb_packet_emul(uint8_t itf, uint16_t len) {
if (ccid_atr) {
memcpy(rdata, ccid_atr + 1, ccid_atr[0]);
}
emul_write(itf, ccid_atr ? ccid_atr[0] : 0);
driver_write_emul(itf, ccid_atr ? ccid_atr + 1 : NULL, ccid_atr ? ccid_atr[0] : 0);
}
}
else {