[asterisk-commits] russell: branch 1.6.1 r142357 - in /branches/1.6.1: ./ main/sched.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Sep 10 11:42:52 CDT 2008
Author: russell
Date: Wed Sep 10 11:42:52 2008
New Revision: 142357
URL: http://svn.digium.com/view/asterisk?view=rev&rev=142357
Log:
Merged revisions 142355 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r142355 | russell | 2008-09-10 11:41:55 -0500 (Wed, 10 Sep 2008) | 15 lines
Merged revisions 142354 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r142354 | russell | 2008-09-10 11:39:53 -0500 (Wed, 10 Sep 2008) | 7 lines
It is a normal situation that a task gets put in the scheduler that should run
as soon as possible. Accept "0" as an acceptable time to run, and also treat
negative as "run now", and don't print a debug message about it.
(inspired by a message asking about the "request to schedule in the past"
debug message on the -dev list)
........
................
Modified:
branches/1.6.1/ (props changed)
branches/1.6.1/main/sched.c
Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.1/main/sched.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/main/sched.c?view=diff&rev=142357&r1=142356&r2=142357
==============================================================================
--- branches/1.6.1/main/sched.c (original)
+++ branches/1.6.1/main/sched.c Wed Sep 10 11:42:52 2008
@@ -254,7 +254,6 @@
*t = now;
*t = ast_tvadd(*t, ast_samp2tv(when, 1000));
if (ast_tvcmp(*t, now) < 0) {
- ast_debug(1, "Request to schedule in the past?!?!\n");
*t = now;
}
return 0;
@@ -276,11 +275,9 @@
{
struct sched *tmp;
int res = -1;
+
DEBUG(ast_debug(1, "ast_sched_add()\n"));
- if (!when) {
- ast_log(LOG_NOTICE, "Scheduled event in 0 ms?\n");
- return -1;
- }
+
ast_mutex_lock(&con->lock);
if ((tmp = sched_alloc(con))) {
tmp->id = con->eventcnt++;
@@ -302,6 +299,7 @@
ast_sched_dump(con);
#endif
ast_mutex_unlock(&con->lock);
+
return res;
}
More information about the asterisk-commits
mailing list