Refactor RaspberryPi port

This commit is contained in:
Marcelo Aquino
2016-08-16 13:42:51 -03:00
parent 2315e2d62c
commit 6b756335d0
32 changed files with 2460 additions and 224 deletions
+2 -2
View File
@@ -467,7 +467,7 @@ void transportProcessMessage() {
// Is message addressed to this node?
if (destination == _nc.nodeId) {
// prevent buffer overflow by limiting max. possible message length (5 bits=31 bytes max) to MAX_PAYLOAD (25 bytes)
mSetLength(_msg, min(mGetLength(_msg),MAX_PAYLOAD));
mSetLength(_msg, min(mGetLength(_msg),(uint8_t)MAX_PAYLOAD));
// null terminate data
_msg.data[mGetLength(_msg)] = 0x00;
@@ -717,4 +717,4 @@ bool transportSendWrite(uint8_t to, MyMessage &message) {
return (ok || to==BROADCAST_ADDRESS);
}
// EOF MyTransport.cpp
// EOF MyTransport.cpp