Module: sems
Branch: master
Commit: f4eae0641a1f69a6554f2035b7bc3fea70cde07c
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=f4eae0641a1f69a6554f2035b7bc3fea70cde07c

Author: Stefan Sayer <[email protected]>
Committer: Stefan Sayer <[email protected]>
Date:   Wed Feb 23 12:03:23 2011 +0100

b/f: wait_for_to for timeout>1s

Patch by Robert Szokovacs rszokovacs gamatelecom dot hu

---

 core/AmThread.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/core/AmThread.h b/core/AmThread.h
index ed2cb08..ee7a95e 100644
--- a/core/AmThread.h
+++ b/core/AmThread.h
@@ -164,8 +164,8 @@ public:
     bool ret = false;
 
     gettimeofday(&now, NULL);
-    timeout.tv_sec = now.tv_sec;
-    timeout.tv_nsec = (now.tv_usec + usec) * 1000;
+    timeout.tv_sec = now.tv_sec + (usec / 1000000);
+    timeout.tv_nsec = (now.tv_usec + (usec % 1000000)) * 1000;
 
     pthread_mutex_lock(&m);
     while(!t && !retcode){

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to