diff options
author | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-03-06 20:41:21 +0000 |
---|---|---|
committer | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-03-06 20:41:21 +0000 |
commit | 9d56ef3efd3f07258616632a1baf9c007ac40a55 (patch) | |
tree | b709637a5ebc2462e6816179640a529fda9b0e6a /apps/app_stack.c | |
parent | 8d5bdd3a6393b88bf27f226e4e181139391e97ce (diff) |
Debug control, debug control.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@58054 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_stack.c')
-rw-r--r-- | apps/app_stack.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/app_stack.c b/apps/app_stack.c index 93597cc3a..a3124647e 100644 --- a/apps/app_stack.c +++ b/apps/app_stack.c @@ -154,7 +154,7 @@ static int pop_exec(struct ast_channel *chan, void *data) if (oldframe) gosub_release_frame(chan, oldframe); - else + else if (option_debug) ast_log(LOG_DEBUG, "%s called with an empty gosub stack\n", app_pop); return 0; @@ -210,7 +210,8 @@ static int gosub_exec(struct ast_channel *chan, void *data) u = ast_module_user_add(chan); if (!stack_store) { - ast_log(LOG_DEBUG, "Channel %s has no datastore, so we're allocating one.\n", chan->name); + if (option_debug) + ast_log(LOG_DEBUG, "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"); @@ -258,7 +259,8 @@ 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]); - ast_log(LOG_DEBUG, "Setting '%s' to '%s'\n", argname, args2.argval[i]); + if (option_debug) + ast_log(LOG_DEBUG, "Setting '%s' to '%s'\n", argname, args2.argval[i]); } /* And finally, save our return address */ |