Comments (4)
From [email protected] on December 16, 2010 23:51:26
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
from tinyos-main.
From mortenthansen on December 17, 2010 01:44:33
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.
from tinyos-main.
From [email protected] on December 18, 2010 01:42:30
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.
from tinyos-main.
From [email protected] on December 22, 2010 00:30:50
I applied your fix.
from tinyos-main.
Related Issues (20)
- JNI Serial Update
- which version is this? HOT 6
- TestNetworkC.nc uses only root node
- How about TinyOS now? HOT 12
- To Update GPG Signature for Ubuntu18.04 HOT 12
- I can't compile Blip Applications for Iris Motes HOT 3
- Issue building to TOSSIM HOT 9
- problem when installing tinyos HOT 2
- problems when trying to install packages to install tinyos HOT 1
- How to implement DTLS on Tinyos/TOSSIM HOT 1
- Compile msp430-gcc HOT 2
- Make Java errors "requested alignment is not a power of 2"
- Dynamic Linking in TinyOS HOT 2
- Issue compiling 'make micaz sim' HOT 1
- test HOT 2
- What should I do if I can't connect to http://tinyprod.net/ when installing tinyos HOT 2
- tos-bsl still requires python2 HOT 1
- Meet problem in ~/top/tinyos-main/tinyos-2.x/apps/tutorials/RssiDemo HOT 1
- unnecessary endif
- Current status of TinyOS HOT 1
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.