offset = strlen(c->exten);
strncpy(workspace, c->exten + offset, workspacelen - 1);
*ret = workspace;
- ast_log(LOG_WARNING, "The use of 'EXTEN-foo' has been derprecated in favor of 'EXTEN:foo'\n");
+ ast_log(LOG_WARNING, "The use of 'EXTEN-foo' has been deprecated in favor of 'EXTEN:foo'\n");
} else if (c && !strcmp(var, "RDNIS")) {
if (c->rdnis) {
strncpy(workspace, c->rdnis, workspacelen - 1);
ast_log(LOG_WARNING, "%s already has PBX structure??\n", c->name);
c->pbx = malloc(sizeof(struct ast_pbx));
if (!c->pbx) {
- ast_log(LOG_WARNING, "Out of memory\n");
+ ast_log(LOG_ERROR, "Out of memory\n");
return -1;
}
if (c->amaflags) {
apps = tmp;
}
} else {
- ast_log(LOG_WARNING, "Out of memory\n");
+ ast_log(LOG_ERROR, "Out of memory\n");
ast_mutex_unlock(&applock);
return -1;
}
else if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_3 "Registered extension context '%s'\n", tmp->name);
} else
- ast_log(LOG_WARNING, "Out of memory\n");
+ ast_log(LOG_ERROR, "Out of memory\n");
if (!extcontexts)
ast_mutex_unlock(&conlock);
int x;
int s1, s2;
int e1, e2;
+ int cth, ctm;
//[PHM 07/01/03]
//start disabling all times, fill the fields with 0's, as they may contain garbage
/* Otherwise expect a range */
e = strchr(times, '-');
if (!e) {
- ast_log(LOG_WARNING, "Time range is not valid. Assuming no time.\n");
+ ast_log(LOG_WARNING, "Time range is not valid. Assuming no restrictions based on time.\n");
return;
}
*e = '\0';
e++;
while(*e && !isdigit(*e)) e++;
if (!*e) {
- ast_log(LOG_WARNING, "Invalid time range. Assuming no time.\n");
+ ast_log(LOG_WARNING, "Invalid time range. Assuming no restrictions based on time.\n");
return;
}
if (sscanf(times, "%d:%d", &s1, &s2) != 2) {
- ast_log(LOG_WARNING, "%s isn't a time. Assuming no time.\n", times);
+ ast_log(LOG_WARNING, "%s isn't a time. Assuming no restrictions based on time.\n", times);
return;
}
if (sscanf(e, "%d:%d", &e1, &e2) != 2) {
- ast_log(LOG_WARNING, "%s isn't a time. Assuming no time.\n", e);
+ ast_log(LOG_WARNING, "%s isn't a time. Assuming no restrictions based on time.\n", e);
return;
}
+
+#if 0
s1 = s1 * 30 + s2/2;
if ((s1 < 0) || (s1 >= 24*30)) {
ast_log(LOG_WARNING, "%s isn't a valid star time. Assuming no time.\n", times);
}
/* Do the last one */
i->minmask[x/30] |= (1 << (x % 30));
+#else
+ for (cth=0;cth<24;cth++) {
+ /* Initialize masks to blank */
+ i->minmask[cth] = 0;
+ for (ctm=0;ctm<30;ctm++) {
+ if (
+ /* First hour with more than one hour */
+ (((cth == s1) && (ctm >= s2)) &&
+ ((cth < e1)))
+ /* Only one hour */
+ || (((cth == s1) && (ctm >= s2)) &&
+ ((cth == e1) && (ctm <= e2)))
+ /* In between first and last hours (more than 2 hours) */
+ || ((cth > s1) &&
+ (cth < e1))
+ /* Last hour with more than one hour */
+ || ((cth > s1) &&
+ ((cth == e1) && (ctm <= e2)))
+ )
+ i->minmask[cth] |= (1 << (ctm / 2));
+ }
+ }
+#endif
/* All done */
return;
}
/* allocate new include structure ... */
if (!(new_include = malloc(sizeof(struct ast_include)))) {
- ast_log(LOG_WARNING, "Out of memory\n");
+ ast_log(LOG_ERROR, "Out of memory\n");
errno = ENOMEM;
return -1;
}
/* allocate new sw structure ... */
if (!(new_sw = malloc(sizeof(struct ast_sw)))) {
- ast_log(LOG_WARNING, "Out of memory\n");
+ ast_log(LOG_ERROR, "Out of memory\n");
errno = ENOMEM;
return -1;
}
struct ast_ignorepat *ignorepat, *ignorepatc, *ignorepatl = NULL;
ignorepat = malloc(sizeof(struct ast_ignorepat));
if (!ignorepat) {
- ast_log(LOG_WARNING, "Out of memory\n");
+ ast_log(LOG_ERROR, "Out of memory\n");
errno = ENOMEM;
return -1;
}
tmp->peer = NULL;
tmp->next = NULL;
} else {
- ast_log(LOG_WARNING, "Out of memory\n");
+ ast_log(LOG_ERROR, "Out of memory\n");
errno = ENOMEM;
return -1;
}
chan->priority = as->priority;
/* Run the PBX */
if (ast_pbx_run(chan)) {
- ast_log(LOG_WARNING, "Failed to start PBX on %s\n", chan->name);
+ ast_log(LOG_ERROR, "Failed to start PBX on %s\n", chan->name);
} else {
/* PBX will have taken care of this */
chan = NULL;
if (sync > 1) {
if (ast_pbx_run(chan)) {
- ast_log(LOG_WARNING, "Unable to run PBX on %s\n", chan->name);
+ ast_log(LOG_ERROR, "Unable to run PBX on %s\n", chan->name);
ast_hangup(chan);
res = -1;
}
} else {
if (ast_pbx_start(chan)) {
- ast_log(LOG_WARNING, "Unable to start PBX on %s\n", chan->name);
+ ast_log(LOG_ERROR, "Unable to start PBX on %s\n", chan->name);
ast_hangup(chan);
res = -1;
}
}
}
} else {
- ast_log(LOG_WARNING, "Out of memory :(\n");
+ ast_log(LOG_ERROR, "Out of memory :(\n");
res = -1;
}
} else {
char *stringp=NULL;
if (!data || !strlen(data)) {
- ast_log(LOG_WARNING, "Ignoring, since there is no variable to set\n");
+ ast_log(LOG_WARNING, "Ignoring, since there is no variable to check\n");
return 0;
}
}
if ((branch==NULL) || (strlen(branch)==0)) {
- ast_log(LOG_WARNING, "Not taking any branch\n");
+ ast_log(LOG_NOTICE, "Not taking any branch\n");
return(0);
}