summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Brands <jan.r.brands@nxp.com>2011-02-18 15:39:52 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2011-02-18 15:39:52 -0800
commita16a757c0365eb800e5cc675670a3a2d97fd1b8e (patch)
tree0c17113ef541b56afc1fb81e33dd098dd54c191d
parent323956234e513e9200e2ec2b44dee3a37e937094 (diff)
parent29e144ebf81b0f09b3fe4c26b67485ce836909c6 (diff)
downloadexternal_libnfc-nxp-a16a757c0365eb800e5cc675670a3a2d97fd1b8e.zip
external_libnfc-nxp-a16a757c0365eb800e5cc675670a3a2d97fd1b8e.tar.gz
external_libnfc-nxp-a16a757c0365eb800e5cc675670a3a2d97fd1b8e.tar.bz2
am 29e144eb: Fix to prevent accidental stopping of timers.
* commit '29e144ebf81b0f09b3fe4c26b67485ce836909c6': Fix to prevent accidental stopping of timers.
-rw-r--r--Linux_x86/phOsalNfc_Timer.c5
1 files changed, 5 insertions, 0 deletions
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 @@ void phOsalNfc_Timer_Start(uint32_t TimerId,
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;