Make this module build on my mac

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78142 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant 2007-08-05 04:01:28 +00:00
parent 05d60c7860
commit 2e6fe76de6
1 changed files with 8 additions and 8 deletions

View File

@ -160,38 +160,38 @@ static int execif_exec(struct ast_channel *chan, void *data)
AST_APP_ARG(remainder);
);
AST_DECLARE_APP_ARGS(apps,
AST_APP_ARG(true);
AST_APP_ARG(false);
AST_APP_ARG(t);
AST_APP_ARG(f);
);
char *parse = ast_strdupa(data);
AST_NONSTANDARD_APP_ARGS(expr, parse, '?');
AST_NONSTANDARD_APP_ARGS(apps, expr.remainder, ':');
if (apps.true && (truedata = strchr(apps.true, '('))) {
if (apps.t && (truedata = strchr(apps.t, '('))) {
*truedata++ = '\0';
if ((end = strrchr(truedata, ')')))
*end = '\0';
}
if (apps.false && (falsedata = strchr(apps.false, '('))) {
if (apps.f && (falsedata = strchr(apps.f, '('))) {
*falsedata++ = '\0';
if ((end = strrchr(falsedata, ')')))
*end = '\0';
}
if (pbx_checkcondition(expr.expr)) {
if (!ast_strlen_zero(apps.true) && (app = pbx_findapp(apps.true))) {
if (!ast_strlen_zero(apps.t) && (app = pbx_findapp(apps.t))) {
res = pbx_exec(chan, app, S_OR(truedata, ""));
} else {
ast_log(LOG_WARNING, "Could not find application! (%s)\n", apps.true);
ast_log(LOG_WARNING, "Could not find application! (%s)\n", apps.t);
res = -1;
}
} else {
if (!ast_strlen_zero(apps.false) && (app = pbx_findapp(apps.false))) {
if (!ast_strlen_zero(apps.f) && (app = pbx_findapp(apps.f))) {
res = pbx_exec(chan, app, S_OR(falsedata, ""));
} else {
ast_log(LOG_WARNING, "Could not find application! (%s)\n", apps.false);
ast_log(LOG_WARNING, "Could not find application! (%s)\n", apps.f);
res = -1;
}
}