mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-16 21:28:33 +03:00
CCID: Change cold to warm rst on PCtoRDRIccPowerOn
Before this change pcsc_scan would always receive garbage from the stack when the reset button was pressed on the simtrace board. Because the return value of ISO7816_GetChar is never checked anywhere. If there is a timeout in this function, the non-initialized local variable values which happen to be lying around on the stack are inserted into the ATR message and send to the host. This only helps mitigating the symptoms but does not remove the reason for the behavior. On the other hand, is it really feasable to check the return value on EVERY call to ISO7816_GetChar..?
This commit is contained in:
@@ -849,7 +849,8 @@ static void PCtoRDRIccPowerOn( void )
|
||||
ccidDriver.sCcidCommand.bSpecific_0 = VOLTS_AUTO;
|
||||
}
|
||||
|
||||
ISO7816_cold_reset();
|
||||
ISO7816_warm_reset();
|
||||
// ISO7816_cold_reset();
|
||||
|
||||
// for emulation only //JCB
|
||||
if ( ccidDriver.sCcidCommand.bSpecific_0 != VOLTS_5_0 ) {
|
||||
|
||||
Reference in New Issue
Block a user