From cf3b725fe906080f6abf3f2ff16eb565660062aa Mon Sep 17 00:00:00 2001 From: Matteo Brancaleoni Date: Tue, 18 Feb 2003 18:15:30 +0000 Subject: mar feb 18 19:15:15 CET 2003 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@618 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_agi.c | 2 ++ apps/app_authenticate.c | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'apps') diff --git a/apps/app_agi.c b/apps/app_agi.c index e7bccedf6..a616e814d 100755 --- a/apps/app_agi.c +++ b/apps/app_agi.c @@ -958,6 +958,8 @@ static agi_command *find_command(char *cmds[], int exact) then this is not a match */ if (!commands[x].cmda[y] && !exact) break; + /* don't segfault if the next part of a command doesn't exist */ + if (!commands[x].cmda[y]) return NULL; if (strcasecmp(commands[x].cmda[y], cmds[y])) match = 0; } diff --git a/apps/app_authenticate.c b/apps/app_authenticate.c index 69d244351..589ef06ba 100755 --- a/apps/app_authenticate.c +++ b/apps/app_authenticate.c @@ -23,7 +23,7 @@ #include #include #include - +#include #include @@ -86,7 +86,6 @@ static int auth_exec(struct ast_channel *chan, void *data) res = 0; if (password[0] == '/') { /* Compare against a file */ - char tmp[80]; FILE *f; f = fopen(password, "r"); if (f) { @@ -114,6 +113,9 @@ static int auth_exec(struct ast_channel *chan, void *data) if ((retries < 3) && !res) { if (strchr(opts, 'a')) ast_cdr_setaccount(chan, passwd); + res = ast_streamfile(chan, "auth-thankyou", chan->language); + if (!res) + res = ast_waitstream(chan, ""); } else { if (!res) res = ast_streamfile(chan, "vm-goodbye", chan->language); -- cgit v1.2.3