diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-14 19:39:12 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-14 19:39:12 +0000 |
commit | f0424318479863edeed2a6a128e6d1ac926966e3 (patch) | |
tree | 4fd144260e58c9a66d331fc81b46473723452479 /apps/app_stack.c | |
parent | c8ca7d2f263f5161ce1b29ec2c9de835131fc950 (diff) |
Add a massive set of changes for converting to use the ast_debug() macro.
(issue #9957, patches from mvanbaak, caio1982, critch, and dimas)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@69327 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_stack.c')
-rw-r--r-- | apps/app_stack.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/apps/app_stack.c b/apps/app_stack.c index 014d2d9ba..bc903cf75 100644 --- a/apps/app_stack.c +++ b/apps/app_stack.c @@ -152,11 +152,11 @@ static int pop_exec(struct ast_channel *chan, void *data) oldframe = AST_LIST_REMOVE_HEAD(oldlist, entries); AST_LIST_UNLOCK(oldlist); - if (oldframe) + if (oldframe) { gosub_release_frame(chan, oldframe); - else if (option_debug) - ast_log(LOG_DEBUG, "%s called with an empty gosub stack\n", app_pop); - + } else { + ast_debug(1, "%s called with an empty gosub stack\n", app_pop); + } return 0; } @@ -210,8 +210,7 @@ static int gosub_exec(struct ast_channel *chan, void *data) u = ast_module_user_add(chan); if (!stack_store) { - if (option_debug) - ast_log(LOG_DEBUG, "Channel %s has no datastore, so we're allocating one.\n", chan->name); + ast_debug(1, "Channel %s has no datastore, so we're allocating one.\n", chan->name); stack_store = ast_channel_datastore_alloc(&stack_info, NULL); if (!stack_store) { ast_log(LOG_ERROR, "Unable to allocate new datastore. Gosub will fail.\n"); @@ -259,8 +258,7 @@ static int gosub_exec(struct ast_channel *chan, void *data) for (i = 0; i < args2.argc; i++) { snprintf(argname, sizeof(argname), "ARG%d", i + 1); pbx_builtin_pushvar_helper(chan, argname, args2.argval[i]); - if (option_debug) - ast_log(LOG_DEBUG, "Setting '%s' to '%s'\n", argname, args2.argval[i]); + ast_debug(1, "Setting '%s' to '%s'\n", argname, args2.argval[i]); } /* And finally, save our return address */ |