Skip to content

Commit

Permalink
Fix #570: carry piggyback data for keep-alives, too
Browse files Browse the repository at this point in the history
  • Loading branch information
terrillmoore committed May 11, 2020
1 parent 2928d4b commit 23a1c84
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lmic/lmic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1855,7 +1855,8 @@ static bit_t buildDataFrame (void) {
// highest importance are the ones in the pendMac buffer.
int end = OFF_DAT_OPTS;

if (LMIC.pendTxPort != 0 && LMIC.pendMacPiggyback && LMIC.pendMacLen != 0) {
// Send piggyback data if: !txdata or txport != 0
if ((! txdata || LMIC.pendTxPort != 0) && LMIC.pendMacPiggyback && LMIC.pendMacLen != 0) {
os_copyMem(LMIC.frame + end, LMIC.pendMacData, LMIC.pendMacLen);
end += LMIC.pendMacLen;
}
Expand Down

0 comments on commit 23a1c84

Please sign in to comment.