/* this is the sole function required by rfid_reader_cm5121.c */
int
PC_to_RDR_Escape(void *handle,
- const unsigned char *tx_buf, unsigned int tx_len,
- unsigned char *rx_buf, unsigned int *rx_len)
+ const unsigned char *tx_buf, size_t tx_len,
+ unsigned char *rx_buf, size_t *rx_len)
{
int rc;
ct_handle *h = (ct_handle *) handle;
if (!h)
return -1;
- printf("acquiring card lock\n");
rc = ct_card_lock(h, slot, IFD_LOCK_EXCLUSIVE, &lock);
- if (rc < 0) {
- fprintf(stderr, "error, no card lock\n");
+ if (rc < 0)
return -1;
- }
rc = ct_card_reset(h, slot, atr, sizeof(atr));
- if (rc < 0) {
- fprintf(stderr, "error, can't reset virtual card\n");
+ if (rc < 0)
return -1;
- }
rath->data = h;