projects
/
fw
/
altos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2903f09
)
altosuilib: Make sure only one thread is closing serial device
author
Keith Packard
<keithp@keithp.com>
Sat, 14 Jun 2014 21:38:00 +0000
(14:38 -0700)
committer
Keith Packard
<keithp@keithp.com>
Sat, 14 Jun 2014 21:38:00 +0000
(14:38 -0700)
Multiple closers can cause a crash by freeing the libaltos device twice
Signed-off-by: Keith Packard <keithp@keithp.com>
altosuilib/AltosSerial.java
patch
|
blob
|
history
diff --git
a/altosuilib/AltosSerial.java
b/altosuilib/AltosSerial.java
index 0632ca7072c3dfae9c887f629a1aa78e06bc5bde..60e15bdb094c9b0d664ef8940f587090e34062e1 100644
(file)
--- a/
altosuilib/AltosSerial.java
+++ b/
altosuilib/AltosSerial.java
@@
-117,7
+117,7
@@
public class AltosSerial extends AltosLink {
SwingUtilities.invokeLater(r);
}
SwingUtilities.invokeLater(r);
}
- private void close_serial() {
+ private
synchronized
void close_serial() {
synchronized (devices_opened) {
devices_opened.remove(device.getPath());
}
synchronized (devices_opened) {
devices_opened.remove(device.getPath());
}