Merge pull request #59 from mapnull/hotfix-rt_before_ack
add node to routing table before send an ack
This commit is contained in:
@@ -282,6 +282,13 @@ boolean MySensor::process() {
|
||||
uint8_t destination = msg.destination;
|
||||
|
||||
if (destination == nc.nodeId) {
|
||||
// This message is addressed to this node
|
||||
|
||||
if (repeaterMode && last != nc.parentNodeId) {
|
||||
// Message is from one of the child nodes. Add it to routing table.
|
||||
addChildRoute(sender, last);
|
||||
}
|
||||
|
||||
// Check if sender requests an ack back.
|
||||
if (mGetRequestAck(msg)) {
|
||||
// Copy message
|
||||
@@ -293,12 +300,6 @@ boolean MySensor::process() {
|
||||
sendRoute(ack);
|
||||
}
|
||||
|
||||
// This message is addressed to this node
|
||||
if (repeaterMode && last != nc.parentNodeId) {
|
||||
// Message is from one of the child nodes. Add it to routing table.
|
||||
addChildRoute(sender, last);
|
||||
}
|
||||
|
||||
if (command == C_INTERNAL) {
|
||||
if (type == I_FIND_PARENT_RESPONSE && !isGateway) {
|
||||
// We've received a reply to a FIND_PARENT message. Check if the distance is
|
||||
|
||||
Reference in New Issue
Block a user