Skip to content

Commit

Permalink
Issue Lora-net#752 - Applied proposed enhancement.
Browse files Browse the repository at this point in the history
  • Loading branch information
mluis1 committed Jul 2, 2019
1 parent 895b6cd commit 1acc148
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions src/mac/LoRaMacCommands.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ Maintainer: Miguel Luis ( Semtech ), Daniel Jaeckle ( STACKFORCE ), Johannes Bru
*/
#define CID_FIELD_SIZE 1

/*!
* List of all stick MAC command answers which will be deleted after a receiving downlink
*/
const uint8_t CIDsStickyAnsCmds[] = { MOTE_MAC_DL_CHANNEL_ANS, MOTE_MAC_RX_PARAM_SETUP_ANS, MOTE_MAC_RX_TIMING_SETUP_ANS };

/*!
* Mac Commands list structure
*/
Expand Down Expand Up @@ -460,16 +455,9 @@ LoRaMacCommandStatus_t LoRaMacCommandsRemoveStickyAnsCmds( void )
while( curElement != NULL )
{
nexElement = curElement->Next;
if( curElement->IsSticky == true )
if( IsSticky( curElement->CID ) == true )
{
for( uint8_t i = 0; i < sizeof( CIDsStickyAnsCmds ); i++ )
{
if( curElement->CID == CIDsStickyAnsCmds[i] )
{
LoRaMacCommandsRemoveCmd( curElement );
break;
}
}
LoRaMacCommandsRemoveCmd( curElement );
}
curElement = nexElement;
}
Expand Down

0 comments on commit 1acc148

Please sign in to comment.