Comments (4)
Doesn't the above fix repeat the problem on msg? Shouldn't it be
- memcpy(newMsg, msg, sizeof(message_t));
+ uint8_t payloadLength = getHeader(msg)->length;
+ memcpy(getHeader(newMsg), msg, sizeof(serial_header_t)+payloadLength);
Phil
Original comment by [email protected]
on 16 Dec 2010 at 11:51
- Changed state: Started
from tinyos-main.
I doubt your version will work.
The incomming packet (message_t* msg) is always from a serial forwarder which
have no idea about the header alignment of TOSSIM messages and will then be
aligned with msg->header. The new packet (message_t* newMsg) should have the
prober alignment so on this message_t we should use getHeader(newMsg).
Does this make sense?
Morten.
Original comment by mortenthansen
on 17 Dec 2010 at 1:44
from tinyos-main.
It does. Sorry, it's been a long time since I saw this code; I forgot that the
message coming in will be aligned at the beginning of the struct, not the
proper header position. This actually suggests the typing of the functions is
wrong, as technically it's not a message_t being passed in. But oh well.
I'll test your fix on Monday and check it in if it works for me.
Original comment by [email protected]
on 18 Dec 2010 at 1:42
from tinyos-main.
I applied your fix.
Original comment by [email protected]
on 22 Dec 2010 at 12:30
- Changed state: Fixed
from tinyos-main.
Related Issues (20)
- [patch] Dhcp6Client fails to find Status options HOT 2
- [patch] Dhcp6Client issues IPAddress.setAddress() even on RENEW HOT 1
- [patch] Dhcp6Client waits unnecessarily long between ADVERTISE and REQUEST HOT 1
- [patch] lib6lowpan fails to set intra-pan flag HOT 5
- "component PlatformC" is missing from tos/chips/atm128rfa1/adc/Atm128AdcC.nc HOT 2
- documentation bug HOT 3
- atm128rfa1 PIN G5 does not work - there is typo HOT 1
- [patch] ip_malloc vs malloc consistency fixes HOT 4
- [patch] Null-pointer dereference in PppP HOT 4
- [patch] IPv6 fragments are assumed to be complete packets HOT 4
- [patch] Null-pointer dereference in fragpool HOT 2
- [patch] PPP frame buffer leakage HOT 2
- HilTimerMilliC exposes the Init interface and LocalTimeMilliC cannot call it
- no null check on malloc HOT 2
- txt/html/pdf TEPs not in sync HOT 1
- apps/PppRouter does not compile with Iris HOT 3
- RPL: Indexing into memory location after array HOT 1
- tinyos.jar built with Java 7 not Java 6, causes java errors. HOT 1
- cppbsl does not compile HOT 4
- [patch] CoapUdpServer - remove unused buffers HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tinyos-main.