Commit graph

111 commits

Author SHA1 Message Date
Francis Gulotta
0bf2ed2da3 Remove deprecated BuildCommDCB for windows support
- This replaces the removed shortcut methods to build a serial port
object with the non deprecated long form.
- Unit and Smoke tested on windows 10.
- Replaces #550 as that source tree has disappeared.
2016-01-26 12:39:29 -05:00
Kunal Pathak
25d6c18abb Fix heap corruption issue on windows
Fix the heap corruption issue in serialport causing random access violation failures.
2015-11-04 22:16:14 -08:00
Rick Waldron
0eeed4e378 Fix Wtautological-pointer-compare warnings: Dereference pointers to check for emptiness, instead of comparing pointer to != NULL.
Fixes:

```
> serialport@2.0.1 install /Users/rwaldron/clonez/node-serialport
> node-pre-gyp install --fallback-to-build

(node) child_process: options.customFds option is deprecated. Use options.stdio instead.
  CXX(target) Release/obj.target/serialport/src/serialport.o
  CXX(target) Release/obj.target/serialport/src/serialport_unix.o
../src/serialport_unix.cpp:695:20: warning: comparison of array 'device.locationId' not
      equal to a null pointer is always true [-Wtautological-pointer-compare]
        if (device.locationId != NULL) {
            ~~~~~~~^~~~~~~~~~    ~~~~
../src/serialport_unix.cpp:698:20: warning: comparison of array 'device.vendorId' not
      equal to a null pointer is always true [-Wtautological-pointer-compare]
        if (device.vendorId != NULL) {
            ~~~~~~~^~~~~~~~    ~~~~
../src/serialport_unix.cpp:701:20: warning: comparison of array 'device.productId' not
      equal to a null pointer is always true [-Wtautological-pointer-compare]
        if (device.productId != NULL) {
            ~~~~~~~^~~~~~~~~    ~~~~
../src/serialport_unix.cpp:704:20: warning: comparison of array 'device.manufacturer' not
      equal to a null pointer is always true [-Wtautological-pointer-compare]
        if (device.manufacturer != NULL) {
            ~~~~~~~^~~~~~~~~~~~    ~~~~
../src/serialport_unix.cpp:707:20: warning: comparison of array 'device.serialNumber' not
      equal to a null pointer is always true [-Wtautological-pointer-compare]
        if (device.serialNumber != NULL) {
            ~~~~~~~^~~~~~~~~~~~    ~~~~
5 warnings generated.
```
2015-10-20 17:45:45 -04:00
Elijah Insua
d653ac396c code clenaup and release created objects 2015-10-12 18:39:25 -04:00
Elijah Insua
c2e0092875 add support for osx el capitan
It appears as though the registry topology has changed in 10.11.

In order to fix that, this code assumes nothing about the path, but
instead works on the assumption that we can already find the registry
entry as soon as the device is enumerated.  By increasing the bounds
of the search we have a better chance of finding the registry entry
that we are looking for

refs: voodootikigod/node-serialport#552
2015-10-12 18:39:25 -04:00
Cong Liu
866e4153b2 Upgrade to Nan 2.0.0 2015-10-11 22:00:46 +02:00
Chris Williams
8204dc647d Version 1.7.4 2015-05-31 15:27:57 -04:00
Chris Williams
c3250203a5 Merge fix. 2015-05-31 11:45:22 -04:00
Chris Williams
d9f26f36c4 Bug fix. 2015-05-31 11:43:52 -04:00
Thomas Sarlandie
e01b979eee Fix two small C errors that crashed build on mac os 10.10 2015-05-31 13:19:37 +02:00
Pedro Miguel Henriques Pereira
e39b2215a9 Updated master to v1.7.1 [publish binary] 2015-05-22 18:51:54 +01:00
Chris Williams
1343881af6 Version 1.7.1 fixing broken code. 2015-05-09 11:30:42 -04:00
Chris Williams
876cd1e3a4 Merge fix. 2015-05-07 11:03:11 -04:00
Chris Williams
eaa4f0a721 Merge fix. 2015-05-07 11:01:03 -04:00
Chris Williams
d5f9a22c1a Merge pull request #502 from voodootikigod/update
unix support for update baudrate
2015-05-07 10:53:39 -04:00
Julien Pilet
d853941f9e Fix a memory leak in SerialportPoller::New
If argument checking fails, the newly allocated SerialportPoller in
SerialportPoller::New was not deleted.
2015-04-11 19:04:41 +02:00
Jacob Rosenthal
7eba3f8d41 unix support for update baudrate 2015-04-10 16:36:27 -07:00
Jacob Rosenthal
9b33efc8e8 set cloexec after open, possible fix for #468 2015-04-10 16:26:35 -07:00
Jonathan Bendes
3f6c7192cd Added hang up on close option to constructor. 2015-04-06 12:44:32 -04:00
Chris Williams
d06870652f Merge pull request #490 from jacobrosenthal/revert-break
Revert "Add BREAK command, useful for CISCO router to break into rommon"
2015-03-17 13:26:08 -07:00
Jacob Rosenthal
b428c3d940 Revert "Add BREAK command, useful for CISCO router to break into rommon"
This reverts commit f37d1e690d.
2015-03-17 11:11:16 -07:00
Chris Williams
ef3e7afd4d Merge fix. 2015-03-14 21:24:06 -04:00
iangregory
52bdfb573a Fix OpenBSD compatibility issue in serialport_unix.cpp
ioctl() on OpenBSD is defined in <sys/ioctl.h>
2015-03-08 17:17:29 +00:00
Jérôme Marteaux
f37d1e690d Add BREAK command, useful for CISCO router to break into rommon 2015-03-06 15:12:08 +01:00
Jacob Rosenthal
55cce115a3 merged new break control signal for both windows and unix platforms 2015-03-01 20:28:05 -07:00
Jacob Rosenthal
7142d2c6a4 add windows brk support 2015-03-01 19:01:05 -07:00
Jacob Rosenthal
30768e179b control signaling for windows 2015-03-01 18:50:32 -07:00
Jacob Rosenthal
52abeb002f preliminary unix support for break 2015-02-24 06:14:20 -07:00
Rob Giseburt
2c39fa8d9b Fixed uninitialized pointer. 2015-02-19 15:19:35 -06:00
Rob Giseburt
44328582e7 Temporarily removing cleanup on close. 2015-02-19 15:19:35 -06:00
Rob Giseburt
1d44fc97a5 Minor tweaks to close handling of write queue. 2015-02-19 15:19:35 -06:00
Rob Giseburt
5e93743d2c Multiple serial ports will now have their own write queue and thread. 2015-02-19 15:19:34 -06:00
Frank Hunleth
07ee97a1db Add NanScope to fix crash with node-webkit/x86_64
With node-webkit 0.11.5 running on Ubuntu 14.04.1 x86_64,
SerialportPoller::callCallback would exit with V8 error: Cannot create a
handle without a HandleScope. This occurred when constructing the
v8::Handle for argv[1]. Adding a NanScope() to the top of the function
resolves the issue.
2015-01-01 15:29:34 -05:00
Chris Williams
91460f1d4e Bug fix possibly for windows. 2014-12-10 21:41:52 -05:00
Chris Williams
d2c4dea658 Bug fix possibly for windows. 2014-12-10 21:25:07 -05:00
Chris Williams
a742c97279 Merge branch 'master' of github.com:voodootikigod/node-serialport into develop 2014-12-10 20:04:15 -05:00
Chris Williams
92ff632b75 Merge pull request #418 from jacobrosenthal/controlsignals
osx control signaling
2014-12-10 20:03:46 -05:00
David Resseguie
b29fb12844 comment out "write again..." fprintf 2014-12-05 23:55:35 -05:00
Jacob Rosenthal
7664fc5497 osx control signaling 2014-11-23 19:13:48 -07:00
Chris Williams
cc754d2b4a Merge branch 'JohannesRudolph-issue-402' into develop 2014-11-07 10:02:53 -05:00
Chris Williams
42951ea56f Solves for issue #401 2014-11-07 08:02:56 -05:00
Johannes Rudolph
7668a1eea6 Seems we can't use NanScope (or anything v8 for that matter) on the libuv threadpool without getting a segfault. Parse options before opening instead and add a small structure with platform options. 2014-10-27 15:04:55 +01:00
Johannes Rudolph
38237cb18d Add options.platformOptions to allow setting platform specific options on .open() 2014-10-27 12:56:40 +01:00
Chris Williams
f1323b2300 Merge branch 'master' of https://github.com/giseburt/node-serialport into giseburt-master 2014-10-24 22:09:47 -04:00
Rob Giseburt
2325786066 Possible fix for #398 — dropped characters in each write().
Replaced crazy queue.h file with easier-to-understand (and working) doubly-linked-list semantics.
2014-10-16 16:32:21 -05:00
Oliver Schneider
5671b98815 Detect serial device disconnect on linux while polling and stop poling to prevent infinite loop 2014-10-05 21:54:12 +02:00
Rob Giseburt
9525bae483 Potential fix for windows and Node 0.11.13 (atom-shell) 2014-09-02 14:19:48 -05:00
Chris Williams
010027673a Merge pull request #345 from voodootikigod/requewrites
Don't requeue the write if it fails
2014-08-07 16:23:41 -04:00
Chris Williams
11d368b7b0 Identified delete error. 2014-08-02 09:13:58 -04:00
Chris Williams
ddd3c0415a Update. 2014-08-02 09:01:41 -04:00