[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/serial SerialActiveMessageP.nc, 1.9, 1.10
Razvan Musaloiu-E.
razvanm at users.sourceforge.net
Thu Feb 12 17:02:29 PST 2009
Update of /cvsroot/tinyos/tinyos-2.x/tos/lib/serial
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18014
Modified Files:
SerialActiveMessageP.nc
Log Message:
Make the serial stack refuse (with ESIZE) to send packets that are too big.
Index: SerialActiveMessageP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/serial/SerialActiveMessageP.nc,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** SerialActiveMessageP.nc 4 Jun 2008 03:43:50 -0000 1.9
--- SerialActiveMessageP.nc 13 Feb 2009 01:02:26 -0000 1.10
***************
*** 59,62 ****
--- 59,67 ----
uint8_t len) {
serial_header_t* header = getHeader(msg);
+
+ if (len > call Packet.maxPayloadLength()) {
+ return ESIZE;
+ }
+
header->dest = dest;
// Do not set the source address or group, as doing so
More information about the Tinyos-2-commits
mailing list