added error: unresponsive card

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@915 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
sth 2003-02-19 13:36:58 +00:00
parent c05cef9678
commit 57954682fd
3 changed files with 4 additions and 0 deletions

View File

@ -39,6 +39,7 @@ const char *sc_strerror(int error)
"The two PINs did not match (keypad)",
"Message too long (keypad)",
"Timeout while waiting for event (card reader)",
"Unresponsive card (correctly inserted?)",
};
const int rdr_base = -SC_ERROR_READER;
const char *card_errors[] = {

View File

@ -42,6 +42,7 @@ extern "C" {
#define SC_ERROR_KEYPAD_PIN_MISMATCH -1110
#define SC_ERROR_KEYPAD_MSG_TOO_LONG -1111
#define SC_ERROR_EVENT_TIMEOUT -1112
#define SC_ERROR_CARD_UNRESPONSIVE -1113
/* Resulting from a card command or related to the card*/
#define SC_ERROR_CARD_CMD_FAILED -1200

View File

@ -90,6 +90,8 @@ static int pcsc_ret_to_error(long rv)
return SC_ERROR_CARD_RESET;
case SCARD_E_NOT_TRANSACTED:
return SC_ERROR_TRANSMIT_FAILED;
case SCARD_W_UNRESPONSIVE_CARD:
return SC_ERROR_CARD_UNRESPONSIVE;
default:
return SC_ERROR_UNKNOWN;
}