On 2011 January 13, Thursday 15:21:11 Stefan Sayer wrote:
> If you have any contributions to share, or are aware of any issues in
> 1.4-dev version, now it may be a good time to have them included in
> the 1.4 release.

Hi,

Attached is a patch that fixes the 
AmCondition::wait_for_to(unsigned long usec) when usec > 1000000 (1se).

br

Szo
diff -ruw -x.svn sems-orig/core//AmThread.h sems-new/core//AmThread.h
--- sems-orig/core//AmThread.h	2011-02-01 15:18:11.000000000 +0100
+++ sems-new/core//AmThread.h	2011-02-04 13:41:52.000000000 +0100
@@ -164,8 +164,8 @@
     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