aboutsummaryrefslogtreecommitdiffstats
path: root/sched.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2001-04-23 16:50:12 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2001-04-23 16:50:12 +0000
commit1f9a30535942c9b35212651b7346f33824eaf55c (patch)
tree0b2425622e165dbcc8d23d4a4d14320382ad7fd0 /sched.c
parent738216b6a341fc60a581ed8cbdf62090321b4037 (diff)
Version 0.1.8 from FTP
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@294 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'sched.c')
-rwxr-xr-xsched.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/sched.c b/sched.c
index 42afea5be..a4fb1096a 100755
--- a/sched.c
+++ b/sched.c
@@ -62,8 +62,10 @@ struct sched_context *sched_context_create(void)
tmp->eventcnt = 1;
tmp->schedcnt = 0;
tmp->schedq = NULL;
+#ifdef SCHED_MAX_CACHE
tmp->schedc = NULL;
tmp->schedccnt = 0;
+#endif
}
return tmp;
}
@@ -71,6 +73,7 @@ struct sched_context *sched_context_create(void)
void sched_context_destroy(struct sched_context *con)
{
struct sched *s, *sl;
+#ifdef SCHED_MAX_CACHE
/* Eliminate the cache */
s = con->schedc;
while(s) {
@@ -78,6 +81,7 @@ void sched_context_destroy(struct sched_context *con)
s = s->next;
free(sl);
}
+#endif
/* And the queue */
s = con->schedq;
while(s) {
@@ -255,8 +259,14 @@ void ast_sched_dump(struct sched_context *con)
struct timeval tv;
time_t s, ms;
gettimeofday(&tv, NULL);
- ast_log(LOG_DEBUG, "Cheops Schedule Dump (%d in Q, %d Total, %d Cache)\n",
- con-> schedcnt, con->eventcnt - 1, con->schedccnt);
+#ifdef SCHED_MAX_CACHE
+ ast_log(LOG_DEBUG, "Asterisk Schedule Dump (%d in Q, %d Total, %d Cache)\n",
+ con-> schedcnt, con->eventcnt - 1, con->schedccnt);
+#else
+ ast_log(LOG_DEBUG, "Asterisk Schedule Dump (%d in Q, %d Total)\n",
+ con-> schedcnt, con->eventcnt - 1);
+#endif
+
ast_log(LOG_DEBUG, "=================================================\n");
ast_log(LOG_DEBUG, "|ID Callback Data Time (sec:ms) |\n");
ast_log(LOG_DEBUG, "+-----+-----------+-----------+-----------------+\n");