diff options
author | Russell Bryant <russell@russellbryant.com> | 2007-07-26 15:49:18 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2007-07-26 15:49:18 +0000 |
commit | f8483a0d04f73e9d4c4f665efd5397cf96b17510 (patch) | |
tree | de4bd130dafa592858306d2ac6bcc5f85fd51cc8 /res/res_agi.c | |
parent | 51e7035dfeca1def3070ca65f18153ee1d340ba9 (diff) |
Do a massive conversion for using the ast_verb() macro
(closes issue #10277, patches by mvanbaak)
Basically, this changes ...
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3, "Something\n");
to ...
ast_verb(3, "Something\n");
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_agi.c')
-rw-r--r-- | res/res_agi.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/res/res_agi.c b/res/res_agi.c index 44ff18d43..eedad4213 100644 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -346,8 +346,7 @@ static enum agi_result launch_script(char *script, char *argv[], int *fds, int * _exit(1); } pthread_sigmask(SIG_SETMASK, &old_set, NULL); - if (option_verbose > 2) - ast_verbose(VERBOSE_PREFIX_3 "Launched AGI Script %s\n", script); + ast_verb(3, "Launched AGI Script %s\n", script); fds[0] = toast[0]; fds[1] = fromast[1]; if (efd) @@ -584,8 +583,7 @@ static int handle_streamfile(struct ast_channel *chan, AGI *agi, int argc, char vfs = ast_openvstream(chan, argv[2], chan->language); ast_debug(vfs && 1, "Ooh, found a video stream, too\n"); - if (option_verbose > 2) - ast_verbose(VERBOSE_PREFIX_3 "Playing '%s' (escape_digits=%s) (sample_offset %ld)\n", argv[2], edigits, sample_offset); + ast_verb(3, "Playing '%s' (escape_digits=%s) (sample_offset %ld)\n", argv[2], edigits, sample_offset); ast_seekstream(fs, 0, SEEK_END); max_length = ast_tellstream(fs); @@ -640,8 +638,7 @@ static int handle_getoption(struct ast_channel *chan, AGI *agi, int argc, char * vfs = ast_openvstream(chan, argv[2], chan->language); ast_debug(vfs && 1, "Ooh, found a video stream, too\n"); - if (option_verbose > 2) - ast_verbose(VERBOSE_PREFIX_3 "Playing '%s' (escape_digits=%s) (timeout %d)\n", argv[2], edigits, timeout); + ast_verb(3, "Playing '%s' (escape_digits=%s) (timeout %d)\n", argv[2], edigits, timeout); ast_seekstream(fs, 0, SEEK_END); max_length = ast_tellstream(fs); @@ -1096,8 +1093,7 @@ static int handle_exec(struct ast_channel *chan, AGI *agi, int argc, char **argv if (argc < 2) return RESULT_SHOWUSAGE; - if (option_verbose > 2) - ast_verbose(VERBOSE_PREFIX_3 "AGI Script Executing Application: (%s) Options: (%s)\n", argv[1], argv[2]); + ast_verb(3, "AGI Script Executing Application: (%s) Options: (%s)\n", argv[1], argv[2]); if ((app = pbx_findapp(argv[1]))) { res = pbx_exec(chan, app, argv[2]); @@ -1870,8 +1866,7 @@ static enum agi_result run_agi(struct ast_channel *chan, char *request, AGI *agi /* Program terminated */ if (returnstatus && returnstatus != AST_PBX_KEEPALIVE) returnstatus = -1; - if (option_verbose > 2) - ast_verbose(VERBOSE_PREFIX_3 "AGI Script %s completed, returning %d\n", request, returnstatus); + ast_verb(3, "AGI Script %s completed, returning %d\n", request, returnstatus); if (pid > 0) waitpid(pid, status, 0); /* No need to kill the pid anymore, since they closed us */ |