Skip to content

Commit 4a2088c

Browse files
committed
Exclude LmhpComplianceTxProcess function call from the critical section.
1 parent b13d0e4 commit 4a2088c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/apps/LoRaMac/common/LmHandler/packages/LmhpCompliance.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -473,13 +473,16 @@ static void LmhpComplianceOnMcpsIndication( McpsIndication_t* mcpsIndication )
473473

474474
static void LmhpComplianceProcess( void )
475475
{
476+
bool isPending;
477+
476478
CRITICAL_SECTION_BEGIN( );
477-
if( ComplianceTestState.TxPending == true )
479+
isPending = ComplianceTestState.TxPending;
480+
ComplianceTestState.TxPending = false;
481+
CRITICAL_SECTION_END( );
482+
if( isPending == true )
478483
{
479484
LmhpComplianceTxProcess( );
480-
ComplianceTestState.TxPending = false;
481485
}
482-
CRITICAL_SECTION_END( );
483486
}
484487

485488
static void OnComplianceTxNextPacketTimerEvent( void* context )

0 commit comments

Comments
 (0)