Fix to prevent accidental stopping of timers.
Time-out value of 0 is used to indicate minimum value, see e.g.
PH_HAL4NFC_RECV_CB_TIMEOUT in phHal4Nfc_P2P.c where it is used with P2P target
receive in case data has already been received by the PN544
Change-Id: I9f15f2135ca003b848590fc87265edb39d85bf4c
diff --git a/Linux_x86/phOsalNfc_Timer.c b/Linux_x86/phOsalNfc_Timer.c
index da39586..94190e7 100644
--- a/Linux_x86/phOsalNfc_Timer.c
+++ b/Linux_x86/phOsalNfc_Timer.c
@@ -224,6 +224,11 @@
its.it_interval.tv_nsec = 0;
its.it_value.tv_sec = RegTimeCnt / 1000;
its.it_value.tv_nsec = 1000000 * (RegTimeCnt % 1000);
+ if(its.it_value.tv_sec == 0 && its.it_value.tv_nsec == 0)
+ {
+ // this would inadvertently stop the timer
+ its.it_value.tv_nsec = 1;
+ }
timers[TimerId].callback = Application_callback;
timers[TimerId].pContext = pContext;