diff options
author | Mark Michelson <mmichelson@digium.com> | 2008-02-05 23:00:15 +0000 |
---|---|---|
committer | Mark Michelson <mmichelson@digium.com> | 2008-02-05 23:00:15 +0000 |
commit | fe9821cc1066c5233eda63b5d747096f41e8a24c (patch) | |
tree | 5c9c08fb9ce70cd29aa48d1b901718df97e63dac /main | |
parent | bb156b5cb5d761722327d293b6d28d8e913bb9fa (diff) |
Get rid of any remaining ast_verbose calls in the code in favor of
ast_verb
(closes issue #11934)
Reported by: mvanbaak
Patches:
20080205_astverb-2.diff.txt uploaded by mvanbaak (license 7)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@102525 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r-- | main/astmm.c | 3 | ||||
-rw-r--r-- | main/loader.c | 4 | ||||
-rw-r--r-- | main/logger.c | 6 | ||||
-rw-r--r-- | main/pbx.c | 3 | ||||
-rw-r--r-- | main/tcptls.c | 15 |
5 files changed, 13 insertions, 18 deletions
diff --git a/main/astmm.c b/main/astmm.c index 69c124fbe..f14ab8bdc 100644 --- a/main/astmm.c +++ b/main/astmm.c @@ -467,8 +467,7 @@ void __ast_mm_init(void) snprintf(filename, sizeof(filename), "%s/mmlog", ast_config_AST_LOG_DIR); - if (option_verbose) - ast_verbose("Asterisk Malloc Debugger Started (see %s))\n", filename); + ast_verb(1, "Asterisk Malloc Debugger Started (see %s))\n", filename); if ((mmlog = fopen(filename, "a+"))) { fprintf(mmlog, "%ld - New session\n", (long)time(NULL)); diff --git a/main/loader.c b/main/loader.c index 45fc7be82..3b73f43f9 100644 --- a/main/loader.c +++ b/main/loader.c @@ -688,8 +688,8 @@ static enum ast_module_load_result load_resource(const char *resource_name, unsi case AST_MODULE_LOAD_SUCCESS: if (!ast_fully_booted) { ast_verb(1, "%s => (%s)\n", resource_name, term_color(tmp, mod->info->description, COLOR_BROWN, COLOR_BLACK, sizeof(tmp))); - if (ast_opt_console && !option_verbose) - ast_verbose( "."); + if (ast_opt_console) + ast_verb(0, "."); } else { ast_verb(1, "Loaded %s => (%s)\n", resource_name, mod->info->description); } diff --git a/main/logger.c b/main/logger.c index 31fd1a91b..02d612c3e 100644 --- a/main/logger.c +++ b/main/logger.c @@ -849,8 +849,7 @@ static void logger_print_normal(struct logmsg *logmsg) if (filesize_reload_needed) { reload_logger(-1); ast_log(LOG_EVENT, "Rotated Logs Per SIGXFSZ (Exceeded file size limit)\n"); - if (option_verbose) - ast_verbose("Rotated Logs Per SIGXFSZ (Exceeded file size limit)\n"); + ast_verb(1, "Rotated Logs Per SIGXFSZ (Exceeded file size limit)\n"); } return; @@ -936,8 +935,7 @@ int init_logger(void) eventlog = fopen(tmp, "a"); if (eventlog) { ast_log(LOG_EVENT, "Started Asterisk Event Logger\n"); - if (option_verbose) - ast_verbose("Asterisk Event Logger Started %s\n", tmp); + ast_verb(1, "Asterisk Event Logger Started %s\n", tmp); } else { ast_log(LOG_ERROR, "Unable to create event log: %s\n", strerror(errno)); res = -1; diff --git a/main/pbx.c b/main/pbx.c index 4578b32c2..468aa5425 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -7035,8 +7035,7 @@ static int pbx_builtin_waitexten(struct ast_channel *chan, void *data) if (ast_exists_extension(chan, chan->context, chan->exten, chan->priority + 1, chan->cid.cid_num)) { ast_verb(3, "Timeout on %s, continuing...\n", chan->name); } else if (chan->_softhangup == AST_SOFTHANGUP_TIMEOUT) { - if (option_verbose > 2) - ast_verbose(VERBOSE_PREFIX_3 "Call timeout on %s, checking for 'T'\n", chan->name); + ast_verb(3, "Call timeout on %s, checking for 'T'\n", chan->name); res = -1; } else if (ast_exists_extension(chan, chan->context, "t", 1, chan->cid.cid_num)) { ast_verb(3, "Timeout on %s, going to 't'\n", chan->name); diff --git a/main/tcptls.c b/main/tcptls.c index f9c18ac49..e11155a3e 100644 --- a/main/tcptls.c +++ b/main/tcptls.c @@ -56,7 +56,7 @@ static HOOK_T ssl_read(void *cookie, char *buf, LEN_T len) #if 0 if (i >= 0) buf[i] = '\0'; - ast_verbose("ssl read size %d returns %d <%s>\n", (int)len, i, buf); + ast_verb(0, "ssl read size %d returns %d <%s>\n", (int)len, i, buf); #endif return i; } @@ -67,7 +67,7 @@ static HOOK_T ssl_write(void *cookie, const char *buf, LEN_T len) char *s = alloca(len+1); strncpy(s, buf, len); s[len] = '\0'; - ast_verbose("ssl write size %d <%s>\n", (int)len, s); + ast_verb(0, "ssl write size %d <%s>\n", (int)len, s); #endif return SSL_write(cookie, buf, len); } @@ -169,7 +169,7 @@ static int __ssl_setup(struct ast_tls_config *cfg, int client) SSL_CTX_check_private_key(cfg->ssl_ctx) == 0 ) { if (!client) { /* Clients don't need a certificate, but if its setup we can use it */ - ast_verbose("SSL cert error <%s>", cfg->certfile); + ast_verb(0, "SSL cert error <%s>", cfg->certfile); sleep(2); cfg->enabled = 0; return 0; @@ -179,7 +179,7 @@ static int __ssl_setup(struct ast_tls_config *cfg, int client) if (!ast_strlen_zero(cfg->cipher)) { if (SSL_CTX_set_cipher_list(cfg->ssl_ctx, cfg->cipher) == 0 ) { if (!client) { - ast_verbose("SSL cipher error <%s>", cfg->cipher); + ast_verb(0, "SSL cipher error <%s>", cfg->cipher); sleep(2); cfg->enabled = 0; return 0; @@ -188,10 +188,10 @@ static int __ssl_setup(struct ast_tls_config *cfg, int client) } if (!ast_strlen_zero(cfg->cafile) || !ast_strlen_zero(cfg->capath)) { if (SSL_CTX_load_verify_locations(cfg->ssl_ctx, S_OR(cfg->cafile, NULL), S_OR(cfg->capath,NULL)) == 0) - ast_verbose("SSL CA file(%s)/path(%s) error\n", cfg->cafile, cfg->capath); + ast_verb(0, "SSL CA file(%s)/path(%s) error\n", cfg->cafile, cfg->capath); } - ast_verbose("SSL certificate ok\n"); + ast_verb(0, "SSL certificate ok\n"); return 1; #endif } @@ -369,8 +369,7 @@ void *ast_make_file_from_fd(void *data) else if ( (ser->ssl = SSL_new(ser->parent->tls_cfg->ssl_ctx)) ) { SSL_set_fd(ser->ssl, ser->fd); if ((ret = ssl_setup(ser->ssl)) <= 0) { - if(option_verbose > 1) - ast_verbose(VERBOSE_PREFIX_2 "Problem setting up ssl connection: %s\n", ERR_error_string(ERR_get_error(), err)); + ast_verb(2, "Problem setting up ssl connection: %s\n", ERR_error_string(ERR_get_error(), err)); } else { #if defined(HAVE_FUNOPEN) /* the BSD interface */ ser->f = funopen(ser->ssl, ssl_read, ssl_write, NULL, ssl_close); |