mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 11:25:35 +00:00
Minor scheduling fixups
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3482 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
4
sched.c
4
sched.c
@@ -201,7 +201,7 @@ static inline int sched_settime(struct timeval *tv, int when)
|
||||
return -1;
|
||||
}
|
||||
/*ast_log(LOG_DEBUG, "TV -> %lu,%lu\n", tv->tv_sec, tv->tv_usec);*/
|
||||
if (((unsigned long)(tv->tv_sec) > 0)&&((unsigned long)(tv->tv_usec) > 0)) {
|
||||
if (((unsigned long)(tv->tv_sec) > 0)||((unsigned long)(tv->tv_usec) > 0)) {
|
||||
if ((unsigned long)(tv_tmp.tv_usec) < (unsigned long)(tv->tv_usec)) {
|
||||
tv_tmp.tv_usec += 1000000;
|
||||
tv_tmp.tv_sec -= 1;
|
||||
@@ -218,7 +218,7 @@ static inline int sched_settime(struct timeval *tv, int when)
|
||||
tv->tv_sec = tv_tmp.tv_sec + (when/1000 - error_sec);
|
||||
tv->tv_usec = tv_tmp.tv_usec + ((when % 1000) * 1000 - error_usec);
|
||||
} else {
|
||||
ast_log(LOG_NOTICE, "Request to schedule in the past?!?!\n");
|
||||
ast_log(LOG_DEBUG, "Request to schedule in the past?!?!\n");
|
||||
tv->tv_sec = tv_tmp.tv_sec;
|
||||
tv->tv_usec = tv_tmp.tv_usec;
|
||||
}
|
||||
|
Reference in New Issue
Block a user