Minor scheduling fixups
authorMark Spencer <markster@digium.com>
Tue, 20 Jul 2004 13:43:33 +0000 (13:43 +0000)
committerMark Spencer <markster@digium.com>
Tue, 20 Jul 2004 13:43:33 +0000 (13:43 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3482 65c4cc65-6c06-0410-ace0-fbb531ad65f3

sched.c

diff --git a/sched.c b/sched.c
index c088d36..786a26b 100755 (executable)
--- a/sched.c
+++ b/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;
        }