[exim-cvs] Ensure timer never set to zero for millisleep. Bu…

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Exim Git Commits Mailing List
Date:  
À: exim-cvs
Sujet: [exim-cvs] Ensure timer never set to zero for millisleep. Bug 1426
Gitweb: http://git.exim.org/exim.git/commitdiff/a40bc6c8fc409f7ad792d8de33c2d9eb1ca03e58
Commit:     a40bc6c8fc409f7ad792d8de33c2d9eb1ca03e58
Parent:     c007c9748e22d0d518cf254f31504d4a7a4db1ee
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Mon May 26 16:09:37 2014 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Tue Jul 22 23:06:15 2014 +0100


    Ensure timer never set to zero for millisleep.  Bug 1426
---
 src/src/exim.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)


diff --git a/src/src/exim.c b/src/src/exim.c
index 517b543..6a23364 100644
--- a/src/src/exim.c
+++ b/src/src/exim.c
@@ -310,7 +310,8 @@ struct itimerval itval;
itval.it_interval.tv_sec = 0;
itval.it_interval.tv_usec = 0;
itval.it_value.tv_sec = msec/1000;
-itval.it_value.tv_usec = (msec % 1000) * 1000;
+if ((itval.it_value.tv_usec = (msec % 1000) * 1000) == 0)
+ itval.it_value.tv_usec = 1;
milliwait(&itval);
}