Module: sems Branch: 1.4 Commit: e6b3af38395d933ae37c406fef1e326fe059b1fb URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=e6b3af38395d933ae37c406fef1e326fe059b1fb
Author: Stefan Sayer <[email protected]> Committer: Stefan Sayer <[email protected]> Date: Mon Apr 30 11:43:38 2012 +0200 b/f: AmCondition::wait_for_to nsec overflow same fix in master: 93dda97a376b Patch by Robert Szokovacs --- core/AmThread.h | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/core/AmThread.h b/core/AmThread.h index ee7a95e..94539eb 100644 --- a/core/AmThread.h +++ b/core/AmThread.h @@ -167,6 +167,11 @@ public: timeout.tv_sec = now.tv_sec + (usec / 1000000); timeout.tv_nsec = (now.tv_usec + (usec % 1000000)) * 1000; + if(timeout.tv_nsec >= 1000000000){ + timeout.tv_sec++; + timeout.tv_nsec -= 1000000000; + } + pthread_mutex_lock(&m); while(!t && !retcode){ retcode = pthread_cond_timedwait(&cond,&m, &timeout); _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
