Fork of Semtech LoRaWAN stack
Fork of LoRaWAN-lib by
Revision 23:80965acdd311, committed 2016-10-12
- Comitter:
- shaunkrnelson
- Date:
- Wed Oct 12 19:26:37 2016 +0000
- Branch:
- v4.2.0
- Parent:
- 22:43aa9a123248
- Child:
- 24:69286d8b3962
- Commit message:
- Github Issue #122,#125 fix for stack hanging when skipIndication = true; ; This issue occurs when doing confirmed uplinks and ; - duplicate downlink counter; - mac commands simultaneously in fopts and payload
Changed in this revision
| LoRaMac.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/LoRaMac.cpp Fri Oct 07 13:22:13 2016 +0000
+++ b/LoRaMac.cpp Wed Oct 12 19:26:37 2016 +0000
@@ -1261,27 +1261,6 @@
DownLinkCounter = downLinkCounter;
}
- // Check if the frame is an acknowledgement
- if( fCtrl.Bits.Ack == 1 )
- {
- McpsConfirm.AckReceived = true;
- McpsIndication.AckReceived = true;
-
- // Stop the AckTimeout timer as no more retransmissions
- // are needed.
- TimerStop( &AckTimeoutTimer );
- }
- else
- {
- McpsConfirm.AckReceived = false;
-
- if( AckTimeoutRetriesCounter > AckTimeoutRetries )
- {
- // Stop the AckTimeout timer as no more retransmissions
- // are needed.
- TimerStop( &AckTimeoutTimer );
- }
- }
if( ( ( size - 4 ) - appPayloadStartIndex ) > 0 )
{
@@ -1345,6 +1324,27 @@
if( skipIndication == false )
{
+ // Check if the frame is an acknowledgement
+ if( fCtrl.Bits.Ack == 1 )
+ {
+ McpsConfirm.AckReceived = true;
+ McpsIndication.AckReceived = true;
+
+ // Stop the AckTimeout timer as no more retransmissions
+ // are needed.
+ TimerStop( &AckTimeoutTimer );
+ }
+ else
+ {
+ McpsConfirm.AckReceived = false;
+
+ if( AckTimeoutRetriesCounter > AckTimeoutRetries )
+ {
+ // Stop the AckTimeout timer as no more retransmissions
+ // are needed.
+ TimerStop( &AckTimeoutTimer );
+ }
+ }
LoRaMacFlags.Bits.McpsInd = 1;
}
}
