Check for OK status code in chained replies.
This commit is contained in:
parent
bc7dede0ac
commit
a52f3a648e
1 changed files with 5 additions and 1 deletions
|
@ -51,7 +51,11 @@ pub(crate) fn send_command(
|
||||||
expect_reply,
|
expect_reply,
|
||||||
)?)?;
|
)?)?;
|
||||||
|
|
||||||
// FIXME: first check for 0x61xx or 0x9000?
|
// Only continue if status is 0x61xx or 0x9000.
|
||||||
|
if next.status().0 != 0x61 && next.status() != (0x90, 0x0) {
|
||||||
|
return Err(Error::CardStatus(StatusByte::from(next.status())));
|
||||||
|
}
|
||||||
|
|
||||||
log::debug!(" appending {} bytes to response", next.raw_data().len());
|
log::debug!(" appending {} bytes to response", next.raw_data().len());
|
||||||
|
|
||||||
// Append new data to resp.data and overwrite status.
|
// Append new data to resp.data and overwrite status.
|
||||||
|
|
Loading…
Reference in a new issue