Skip to content
Snippets Groups Projects
Commit 4967a968 authored by Joshua Colp's avatar Joshua Colp Committed by Gerrit Code Review
Browse files

Merge "sched.c: Add warning about negative time interval request."

parents 9f229d6a 9bc7386b
No related branches found
No related tags found
No related merge requests found
......@@ -450,6 +450,17 @@ static int sched_settime(struct timeval *t, int when)
{
struct timeval now = ast_tvnow();
if (when < 0) {
/*
* A negative when value is likely a bug as it
* represents a VERY large timeout time.
*/
ast_log(LOG_WARNING,
"Bug likely: Negative time interval %d (interpreted as %u ms) requested!\n",
when, (unsigned int) when);
ast_assert(0);
}
/*ast_debug(1, "TV -> %lu,%lu\n", tv->tv_sec, tv->tv_usec);*/
if (ast_tvzero(*t)) /* not supplied, default to now */
*t = now;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment