-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
src: migrate pthreads to uv_threads #24
Conversation
This is what I get when trying to build on Windows: https://gist.github.com/oliversalzburg/450e114fbb371b32acd7 So, yeah, it seems like the threads are no longer a problem, now |
@oliversalzburg thanks for the report! Can you try again? |
Only 2 errors left:
|
@oliversalzburg I think those are fixed now |
Build and works on Mac OS X. |
Yep, building works on Windows. I can't functionally test anything here at home though :) |
When I run
|
Two things:
Thanks! |
I updated my build log here: https://gist.github.com/oliversalzburg/450e114fbb371b32acd7 There are some warnings. The device I have connected registers as 2 readers, no cards are inserted. |
The problem could be this:
Taken from the community additions @ http://msdn.microsoft.com/en-us/library/windows/desktop/aa379773%28v=vs.85%29.aspx |
http://pcsclite.alioth.debian.org/api/group__API.html#ga33247d5d1257d59e55647c3bb717db24
You need to make a 1st call to I was not aware that for the |
Yes, I was doing that copy when checking status in CardReader but not when checking the |
@oliversalzburg can you try again? |
@santigimeno Much better, but still a bit confusing: $ node examples/example.js
New reader detected OMNIKEY CardMan 5x21 0
New reader detected OMNIKEY CardMan 5x21-CL 0
Status( OMNIKEY CardMan 5x21 0 ): { state: 18, atr: <SlowBuffer > }
card removed
Disconnected
Status( OMNIKEY CardMan 5x21-CL 0 ): { state: 18, atr: <SlowBuffer > }
card removed
Disconnected
Status( OMNIKEY CardMan 5x21-CL 0 ): { state: 65570,
atr: <SlowBuffer 3b 8f 80 01 80 4f 0c a0 00 00 03 06 03 00 01 00 00 00 00 6a> }
card inserted
Protocol( OMNIKEY CardMan 5x21-CL 0 ): 2
Status( OMNIKEY CardMan 5x21-CL 0 ): { state: 65826,
atr: <SlowBuffer 3b 8f 80 01 80 4f 0c a0 00 00 03 06 03 00 01 00 00 00 00 6a> }
[Error: SCardTransmit error: (0x0000001f)]
Status( OMNIKEY CardMan 5x21-CL 0 ): { state: 131090, atr: <SlowBuffer > }
card removed
Disconnected I don't understand the first "card removed" events right after I start the application. I then put one card onto the reader and removed it after a couple of seconds, I don't know if the output is to be expected. Looks pretty good overall though. Nice. |
@oliversalzburg Yeah, the example could be improved. In this case it just means that there's no card inserted in the reader. |
@oliversalzburg On a second thought, it seems to me that the |
@santigimeno The error is emitted right after connecting the card. |
Ok. Then it simply looks like the |
- 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.
c0975e2
to
df25f97
Compare
Already merged in master and published in version 0.4.0 |
'end' event.