Amila Welihinda
c87a31d1d0
doc: added syntax highlighting to readme
2017-03-15 09:37:37 +01:00
Santiago Gimeno
a5a02f8e82
src: fix -Wsign-compare warning on OS X
...
By casting `SCARD_E_INSUFFICIENT_BUFFER` to `LONG`.
2017-03-01 22:38:01 +01:00
Santiago Gimeno
fb6b219d66
Version 0.5.0
2017-02-22 14:48:12 +01:00
Santiago Gimeno
41727718f5
pkg: fix engines.node entry
...
So it allows node.js versions greater than 0.8.0.
2017-02-22 14:47:23 +01:00
Samo Fortuna
1a369f0fad
cardreader: add SCARD_CTL_CODE js implementation
2017-02-22 14:38:13 +01:00
Samo Fortuna
98a5269015
cardreader: allow 0 as a valid protocol value
2017-02-22 14:37:58 +01:00
Santiago Gimeno
51e9db2ad6
Version 0.4.11
2016-11-24 15:14:39 +01:00
Santiago Gimeno
c311ea038c
pcsclite: return SCardGetStatusChange errors
...
So it's possible to know when and why pcsc stops watching for events.
2016-11-24 15:02:57 +01:00
Santiago Gimeno
76a1c9a200
Version 0.4.10
2016-09-23 13:15:21 +02:00
Santiago Gimeno
c83a39e10d
src: fix deadlock in CardReader
...
Move the `uv_mutex_unlock` before the `uv_thread_join` as it could
perfectly lock with `CardReader::HandlerFunction` `uv_mutex_unlock`.
2016-09-23 13:13:58 +02:00
Santiago Gimeno
d2054c73f3
Version 0.4.9
2016-04-12 15:15:13 +02:00
Santiago Gimeno
775a3490f6
deps: upgrade to nan@^2.2.1
2016-04-12 15:14:11 +02:00
Santiago Gimeno
c5f286dc4a
Version 0.4.8
2016-01-22 10:18:45 +01:00
Santiago Gimeno
455afb1134
src: fix readers_name memory deletion
...
- After implementing SCARD_AUTOALLOCATE functionality for getting card
readers name, the deletion of the allocated memory in
`PCSCLite:: HandleReaderStatusChange` was not correctly migrated and
was causing serious issues in `Windows`.
- See: https://github.com/santigimeno/node-pcsclite/issues/45 .
2016-01-22 10:16:34 +01:00
Santiago Gimeno
e424a8f644
Version 0.4.7
2015-12-30 11:12:15 +01:00
Santiago Gimeno
b63f33c7a0
src: improve get_card_readers logic
...
- Use SCARD_AUTOALLOCATE if available. It avoids one extra call to
SCardListReaders.
- If it's not available handle SCARD_E_INSUFFICIENT_BUFFER error by
retrying get_card_readers.
2015-12-30 11:10:21 +01:00
Santiago Gimeno
c3dcecdb63
Version 0.4.6
2015-12-22 15:15:17 +01:00
Santiago Gimeno
87d05a4e64
Version 0.4.5
2015-12-22 15:10:49 +01:00
Santiago Gimeno
1cd7143dc5
src: arm '_end' listener as soon as possible
2015-12-22 15:09:45 +01:00
Santiago Gimeno
57a74befbe
src: improve reader status reporting logic
...
- Avoid sending twice the same status.
- Discard SCARD_E_UNKNOWN_READER error as it's happening when the reader is
disconnected and the disconnection will be detected by the pcsclite.cpp
status thread.
2015-12-22 15:08:35 +01:00
Santiago Gimeno
0bcf3d8436
src: multiple thread synchronization improvements
...
- Allow up to 4 the number of times SCardCancel is called before waiting for
the status `thread` to finish.
- Destroy the mutexes and conds only in the destructors.
- Check that the thread handles are still valid before calling join on them.
2015-12-22 14:59:03 +01:00
Florian Ramillien
06d31638e2
src: handle last event before exit status threads
...
- Avoid 2 consecutive calls to uv_async_send when exiting the cardreader.cpp
check status thread.
- Fix mutex unlock location in cardreader.cpp check status thread.
PR-URL: https://github.com/santigimeno/node-pcsclite/pull/46
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
2015-12-22 14:35:55 +01:00
Santiago Gimeno
688666948e
Version 0.4.4
2015-09-26 16:14:04 +02:00
Santiago Gimeno
4650a529f7
Revert "src: handle last event before exiting status threads"
...
This reverts commit 3800c39291 .
2015-09-26 16:13:46 +02:00
Santiago Gimeno
99391039b7
Version 0.4.3
2015-09-26 14:50:56 +02:00
Florian Ramillien
3800c39291
src: handle last event before exiting status threads
...
- Avoid 2 consecutive calls to uv_async_send when exiting the cardreader.cpp
check status thread.
- Fix mutex unlock location in cardreader.cpp check status thread.
PR-URL: https://github.com/santigimeno/node-pcsclite/pull/46
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
2015-09-26 14:46:45 +02:00
Santiago Gimeno
0a3eaafb2b
src: fix reader disconnection logic
...
- A reader disconnection can't be detected by SCardGetStatusChange in the reader
(cardreader.cpp) but by detecting that the reader doesn't appear in the list of
readers retrieved in pcsclite.cpp.
- The list of readers is now stored in an object where the keys are the names of
the readers. When a reader disconnection is detected, the reader is closed
triggering the 'end' event. Then the reader is removed from the readers list.
2015-09-26 14:35:59 +02:00
Sebastian Arena
8f3309520d
src: check dwEventState and not dwCurrentState
...
- As the new state is returned in the former.
2015-09-26 14:35:50 +02:00
Santiago Gimeno
32d0cb0289
src: fix cardreader thread synchronization
...
- Make sure while handling AsyncResult in HandleReaderStatusChange
(JS thread), the AsyncResult is not overwritten in HandlerFunction
(SCardGetStatusChange thread).
2015-09-26 14:32:02 +02:00
Santiago Gimeno
1ca9670420
src: fix sign-compare warnings in OSX
...
- Cast SCARD_E_TIMEOUT and SCARD_E_NO_READERS_AVAILABLE to LONG
PR-URL: https://github.com/santigimeno/node-pcsclite/pull/44
2015-09-18 07:02:43 +02:00
Santiago Gimeno
83be0bdf61
src: fix snprintf format for OSX
...
- As LONG is defined as a int32_t in OSX.
PR-URL: https://github.com/santigimeno/node-pcsclite/pull/44
2015-09-18 07:02:38 +02:00
Ludovic Rousseau
1956507f27
pkg: update description to use PC/SC
...
Since version 0.4.0 of node-pcsclite all systems Linux, Mac OS X and
Windows are supported.
The wrapper is no more limited to pcsclite but to any implementation of
PC/SC.
2015-09-13 14:25:53 +02:00
Santiago Gimeno
e19f31571a
Version 0.4.2
2015-09-01 14:52:21 +02:00
Santiago Gimeno
b373413669
src: fix double free crashes
...
- After upgrading to nan2 the buffers returned in some of the functions were
being released because of Nan:NewBuffer. See:
https://github.com/nodejs/nan/blob/master/doc/buffers.md#api_nan_new_buffer
2015-09-01 14:47:23 +02:00
Florian Ramillien
806a6b397c
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 >
2015-09-01 14:32:47 +02:00
Santiago Gimeno
52a22bf68b
Version 0.4.1
2015-08-12 12:13:38 +02:00
Santiago Gimeno
9faa4fccb5
pkg: update engine with supported node versions
2015-08-12 12:13:26 +02:00
Santiago Gimeno
37b557fe56
src: upgrade to nan@2.x.x
...
- To support nodejs/iojs@3.x.x
2015-08-12 12:07:51 +02:00
Santiago Gimeno
6b412ec427
Version 0.4.0
2015-05-27 16:10:31 +02:00
Santiago Gimeno
f1a012cdd2
doc: update README.md with supported OS's
2015-05-27 16:09:29 +02:00
Fozi
399d837ae8
src: Windows compile fixes
2015-05-27 16:09:29 +02:00
Fozi
c8425ceb8a
src: implement error_msg for Windows
2015-05-27 16:09:29 +02:00
Santiago Gimeno
1a3c7dec1c
src: multiple Windows fixes
...
- Cross platform implementations of sleep and snprintf.
2015-05-27 16:09:29 +02:00
Santiago Gimeno
0c5e07e0e5
src: migrate pthreads to uv_threads
...
- So it can be compatible in every platform supported by libuv.
- Use attached threads instead of detached.
- Remove all CardReader 'status' listeners before emitting the
'end' event.
2015-05-27 16:09:29 +02:00
Santiago Gimeno
da61bae08a
src: add SCARD_EJECT_CARD definition
...
- And remove duplicated SCARD_STATE_CHANGED definition.
2015-05-27 16:08:52 +02:00
mifi
e387cc0edc
doc: fix example from README
2015-02-02 17:11:45 +01:00
Santiago Gimeno
980ec45bb5
Version 0.3.6
2015-01-19 10:07:35 +01:00
Santiago Gimeno
86083a3ad0
src: LONG should be converted to v8::Number
2015-01-16 16:21:38 +01:00
Santiago Gimeno
47f443bbf9
Version 0.3.5
2014-11-06 10:59:14 +01:00
Santiago Gimeno
b2513ff119
src: add unistd.h to fix sleep compilation error
...
- Fix a couple of warnings.
2014-11-06 10:58:24 +01:00