Commit Graph

181 Commits

Author SHA1 Message Date
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
Martin Endler
86c4ea56d9 0.4.16 2017-02-20 04:12:03 +01:00
Martin Endler
7e8c3390f6 Update README 2017-02-20 04:11:53 +01:00
Martin Endler
2f206e5e62 Merge pull request #6 from VojtechStep/windows-init-fail
Windows init fail
2017-02-20 00:47:10 +01:00
Vojtěch Štěpančík
9f871e9096 If the SCardSvr service is disabled on startup, set it's start type to automatic 2017-02-19 14:46:39 +01:00
Vojtěch Štěpančík
0653bdb376 Added .vscode/ to .gitignore 2017-02-19 11:18:03 +01:00
Martin Endler
5110981ecc 0.4.15 2017-01-28 16:23:11 +01:00
Martin Endler
6a1f59eebb Update README 2017-01-26 20:18:13 +01:00
Martin Endler
9158b3758b Update dependencies 2017-01-26 20:16:35 +01:00
Martin Endler
3e38e08812 Add yarn.lock 2017-01-26 20:12:19 +01:00
Martin Endler
b836f65371 Add Discord badge to README 2017-01-26 19:57:15 +01:00
Martin Endler
89aa567f4e Update README 2017-01-26 19:46:37 +01:00
Martin Endler
d884b34714 Merge branch 'santigimeno-master' 2017-01-26 19:18:27 +01:00
Martin Endler
8f2ba026cf Merge branch 'master' of git://github.com/santigimeno/node-pcsclite into master
# Conflicts:
#	package.json
2017-01-26 19:16:06 +01:00
Martin Endler
11f939ff32 Allow keep trying if SCard service is unavailable 2017-01-26 19:10:48 +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
Martin Endler
848da7b1f1 0.4.14 2016-11-17 23:52:54 +01:00
Martin Endler
114f8372a1 added IOCTL_CCID_ESCAPE constant to reader object to support escape command 2016-11-17 23:52:27 +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
Martin Endler
198c892f34 0.4.13 2016-08-10 21:03:38 +02:00
Martin Endler
14e83642ce updated readme 2016-08-10 21:03:22 +02:00
Martin Endler
8a595c193c 0.4.12 2016-08-10 20:39:30 +02:00
Martin Endler
c3c3cf33ef fixed parse readers string function
added .editorconfig
formatted code
updated dependencies
improved package.json
fixed version number
2016-08-10 20:39:11 +02:00
Hapet95
f65937eb9c Update package.json 2016-07-07 19:16:15 +04:00
Hapet95
98e0715b8e Update package.json 2016-07-07 19:06:45 +04:00
Hapet95
0a3ec3dfa4 Update pcsclite.js 2016-07-07 18:59:49 +04:00
Hapet95
1433216bf2 remove buffertools 2016-07-07 18:59:09 +04: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