X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=src%2Frfid_reader_cm5121_openct.c;h=244ecee36da66c8f573f11aefa6e7efa1fec0ebb;hb=893a580c6f1c7f1cc50d9bd1acc51c9fd6307a17;hp=4bc879cc6feebd098333c51197f40d1c864f3537;hpb=dc97c2a84a373026906696a8109e0ade7384b35d;p=librfid diff --git a/src/rfid_reader_cm5121_openct.c b/src/rfid_reader_cm5121_openct.c index 4bc879c..244ecee 100644 --- a/src/rfid_reader_cm5121_openct.c +++ b/src/rfid_reader_cm5121_openct.c @@ -13,8 +13,8 @@ static int slot = 1; /* 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; @@ -39,18 +39,13 @@ int cm5121_source_init(struct rfid_asic_transport_handle *rath) 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;