mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-23 16:58:33 +03:00
card_emu: Avoid PTS related race-condition
We should not set the new Fi/Di values before we actually transmitted the PTSS PCK at the old baud rate first.
This commit is contained in:
@@ -364,7 +364,7 @@ from_pts3:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static enum iso7816_3_card_state
|
static int
|
||||||
process_byte_pts(struct card_handle *ch, uint8_t byte)
|
process_byte_pts(struct card_handle *ch, uint8_t byte)
|
||||||
{
|
{
|
||||||
switch (ch->pts.state) {
|
switch (ch->pts.state) {
|
||||||
@@ -406,6 +406,7 @@ process_byte_pts(struct card_handle *ch, uint8_t byte)
|
|||||||
flush_pts(ch);
|
flush_pts(ch);
|
||||||
/* activate UART TX to transmit PTS response */
|
/* activate UART TX to transmit PTS response */
|
||||||
card_emu_uart_enable(ch->uart_chan, ENABLE_TX);
|
card_emu_uart_enable(ch->uart_chan, ENABLE_TX);
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ISO_S_IN_PTS;
|
return ISO_S_IN_PTS;
|
||||||
|
|||||||
Reference in New Issue
Block a user