X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosuilib%2FAltosSerial.java;h=1c2e3cd53402ba17dd61acd219433cc8ec85c262;hp=0632ca7072c3dfae9c887f629a1aa78e06bc5bde;hb=119a829e58aff5dd7801fe7ef8cae886bf31fec1;hpb=9b3516419981967a1c6ab956269139977ac368ca diff --git a/altosuilib/AltosSerial.java b/altosuilib/AltosSerial.java index 0632ca70..1c2e3cd5 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_13; import java.io.*; import java.util.*; import java.awt.*; import javax.swing.*; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_13.*; 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()); }