aboutsummaryrefslogtreecommitdiffstats
path: root/pbx.c
diff options
context:
space:
mode:
authormartinp <martinp@f38db490-d61c-443f-a65b-d21fe96a405b>2003-08-07 17:35:08 +0000
committermartinp <martinp@f38db490-d61c-443f-a65b-d21fe96a405b>2003-08-07 17:35:08 +0000
commit4973d099cab7ed1e29508dc95dd011a7eb05ff7d (patch)
tree14dbcee1fed658eef6e6d8c32af2bbd6a2b18fd5 /pbx.c
parent846510e08ce4054415422abcf3051a78ba01f5d1 (diff)
Fix the GotoIfTime application
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1272 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx.c')
-rwxr-xr-xpbx.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/pbx.c b/pbx.c
index 0d3ecf92d..8f20285e0 100755
--- a/pbx.c
+++ b/pbx.c
@@ -2822,8 +2822,12 @@ static void get_timerange(struct ast_include *i, char *times)
//[PHM 07/01/03]
//start disabling all times, fill the fields with 0's, as they may contain garbage
+#if 0
for(x=0;x<24;x++)
i->minmask[x]=0;
+#endif
+ /* this is nicer */
+ memset(i->minmask, 0, sizeof(i->minmask));
/* Star is all times */
if (!strlen(times) || !strcmp(times, "*")) {
@@ -2863,12 +2867,14 @@ static void get_timerange(struct ast_include *i, char *times)
return;
}
/* Go through the time and enable each appropriate bit */
- for (x=s1;x != e1;x = (x + 1) % (24 * 30)) {
+ for (x=s1;x <= e1;x = (x + 1) % (24 * 30)) {
i->minmask[x/30] |= (1 << (x % 30));
}
+#if 0
/* Do the last one */
i->minmask[x/30] |= (1 << (x % 30));
/* All done */
+#endif
}
static char *days[] =