diff options
author | mogorman <mogorman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-10-03 15:53:07 +0000 |
---|---|---|
committer | mogorman <mogorman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-10-03 15:53:07 +0000 |
commit | 4a1aaf52ae4189e660ad57ba69253f54603a2beb (patch) | |
tree | 27a80e26cf8f6ea1728ab5b2b8cc7573fd9f7cdc /apps/app_db.c | |
parent | 1bd1494da59a95dce73628aafc4ba892036b82b2 (diff) |
bug #8076 check option_debug before printing to debug channel.
patch provided in bugnote, with minor changes.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@44253 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_db.c')
-rw-r--r-- | apps/app_db.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/app_db.c b/apps/app_db.c index 73d092ab6..52309b9cf 100644 --- a/apps/app_db.c +++ b/apps/app_db.c @@ -78,7 +78,8 @@ static int deltree_exec(struct ast_channel *chan, void *data) family = strsep(&argv, "/"); keytree = strsep(&argv, "\0"); if (!family || !keytree) { - ast_log(LOG_DEBUG, "Ignoring; Syntax error in argument\n"); + if (option_debug) + ast_log(LOG_DEBUG, "Ignoring; Syntax error in argument\n"); ast_module_user_remove(u); return 0; } @@ -125,7 +126,8 @@ static int del_exec(struct ast_channel *chan, void *data) family = strsep(&argv, "/"); key = strsep(&argv, "\0"); if (!family || !key) { - ast_log(LOG_DEBUG, "Ignoring; Syntax error in argument\n"); + if (option_debug) + ast_log(LOG_DEBUG, "Ignoring; Syntax error in argument\n"); ast_module_user_remove(u); return 0; } @@ -136,7 +138,8 @@ static int del_exec(struct ast_channel *chan, void *data) ast_verbose(VERBOSE_PREFIX_3 "DBdel: Error deleting key from database.\n"); } } else { - ast_log(LOG_DEBUG, "Ignoring, no parameters\n"); + if (option_debug) + ast_log(LOG_DEBUG, "Ignoring, no parameters\n"); } ast_module_user_remove(u); |