[Tinyos-beta-commits] CVS: tinyos-1.x/beta/TOSComm/packet
SerialByteSource.java, 1.1, 1.2
Cory Sharp
cssharp at users.sourceforge.net
Thu Feb 17 10:55:14 PST 2005
- Previous message: [Tinyos-beta-commits] CVS: tinyos-1.x/beta/Drip README.txt,1.5,1.6
- Next message: [Tinyos-beta-commits] CVS: tinyos-1.x/beta/TOSComm/comm
Makefile.linux, NONE, 1.1 NativeSerial_linux.cpp, NONE,
1.1 Makefile, 1.2, 1.3 NativeSerialEnums.h, 1.1,
1.2 TOSSerial.java, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/tinyos/tinyos-1.x/beta/TOSComm/packet
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27396
Modified Files:
SerialByteSource.java
Log Message:
Add finalize to help make serial ports more robust.
Index: SerialByteSource.java
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/TOSComm/packet/SerialByteSource.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SerialByteSource.java 22 Dec 2004 01:31:48 -0000 1.1
--- SerialByteSource.java 17 Feb 2005 18:55:11 -0000 1.2
***************
*** 61,64 ****
--- 61,65 ----
serialPort = new TOSSerial(portName);
}
+ /*
else
{
***************
*** 76,82 ****
serialPort = new JavaxCommSerialPort(sp);
}
}
catch (Exception e) {
! throw new IOException("Port " + portName + " busy");
}
--- 77,84 ----
serialPort = new JavaxCommSerialPort(sp);
}
+ */
}
catch (Exception e) {
! throw new IOException("Could not open " + portName + ": " + e.getMessage());
}
***************
*** 93,97 ****
catch (Exception e) {
serialPort.close();
! throw new IOException("Couldn't configure " + portName);
}
--- 95,99 ----
catch (Exception e) {
serialPort.close();
! throw new IOException("Could not configure " + portName + ": " + e.getMessage() );
}
***************
*** 161,163 ****
--- 163,170 ----
}
+ protected void finalize() {
+ System.out.println("SerialByteSource finalize");
+ serialPort.close();
+ }
+
}
- Previous message: [Tinyos-beta-commits] CVS: tinyos-1.x/beta/Drip README.txt,1.5,1.6
- Next message: [Tinyos-beta-commits] CVS: tinyos-1.x/beta/TOSComm/comm
Makefile.linux, NONE, 1.1 NativeSerial_linux.cpp, NONE,
1.1 Makefile, 1.2, 1.3 NativeSerialEnums.h, 1.1,
1.2 TOSSerial.java, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Tinyos-beta-commits
mailing list