X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altosuilib%2FAltosSerial.java;h=5c32a7d8448512e3bed8e394bd9e62fbb05f777f;hb=96de483d745ea0ef95326de2847a2534f7057846;hp=0632ca7072c3dfae9c887f629a1aa78e06bc5bde;hpb=9b3516419981967a1c6ab956269139977ac368ca;p=fw%2Faltos diff --git a/altosuilib/AltosSerial.java b/altosuilib/AltosSerial.java index 0632ca70..5c32a7d8 100644 --- a/altosuilib/AltosSerial.java +++ b/altosuilib/AltosSerial.java @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of @@ -19,13 +20,13 @@ * Deal with TeleDongle on a serial port */ -package org.altusmetrum.altosuilib_2; +package org.altusmetrum.altosuilib_11; import java.io.*; import java.util.*; import java.awt.*; import javax.swing.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_11.*; import libaltosJNI.*; /* @@ -117,7 +118,7 @@ public class AltosSerial extends AltosLink { SwingUtilities.invokeLater(r); } - private void close_serial() { + private synchronized void close_serial() { synchronized (devices_opened) { devices_opened.remove(device.getPath()); }