src: set pioRecvPci in SCardTransmit to NULL
- It fixes an error on SCardTransmit for windows: RPC_X_BAD_STUB_DATA / 0x06F7 and does not affect other platforms. PR-URL: https://github.com/santigimeno/node-pcsclite/pull/38 Reviewed-By: Ludovic Rousseau <ludovic.rousseau+github@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
This commit is contained in:
committed by
Santiago Gimeno
parent
52a22bf68b
commit
806a6b397c
@@ -532,7 +532,6 @@ void CardReader::DoTransmit(uv_work_t* req) {
|
||||
TransmitInput *ti = static_cast<TransmitInput*>(baton->input);
|
||||
CardReader* obj = baton->reader;
|
||||
|
||||
SCARD_IO_REQUEST io_request;
|
||||
TransmitResult *tr = new TransmitResult();
|
||||
tr->data = new unsigned char[ti->out_len];
|
||||
tr->len = ti->out_len;
|
||||
@@ -541,10 +540,11 @@ void CardReader::DoTransmit(uv_work_t* req) {
|
||||
/* Lock mutex */
|
||||
uv_mutex_lock(&obj->m_mutex);
|
||||
/* Connected? */
|
||||
// Under windows, SCARD_IO_REQUEST param must be NULL. Else error RPC_X_BAD_STUB_DATA / 0x06F7 on each call.
|
||||
if (obj->m_card_handle) {
|
||||
SCARD_IO_REQUEST send_pci = { ti->card_protocol, sizeof(SCARD_IO_REQUEST) };
|
||||
result = SCardTransmit(obj->m_card_handle, &send_pci, ti->in_data, ti->in_len,
|
||||
&io_request, tr->data, &tr->len);
|
||||
NULL, tr->data, &tr->len);
|
||||
}
|
||||
|
||||
/* Unlock the mutex */
|
||||
|
||||
Reference in New Issue
Block a user