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:
Harald Welte
2016-03-20 13:37:11 +01:00
parent a929f218d2
commit ccb8a22037

View File

@@ -364,7 +364,7 @@ from_pts3:
}
static enum iso7816_3_card_state
static int
process_byte_pts(struct card_handle *ch, uint8_t byte)
{
switch (ch->pts.state) {
@@ -406,6 +406,7 @@ process_byte_pts(struct card_handle *ch, uint8_t byte)
flush_pts(ch);
/* activate UART TX to transmit PTS response */
card_emu_uart_enable(ch->uart_chan, ENABLE_TX);
return -1;
}
return ISO_S_IN_PTS;