mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-22 20:56:39 +00:00
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
This commit is contained in:
@@ -1634,11 +1634,9 @@ static int handle_command_response(struct dundi_transaction *trans, struct dundi
|
||||
ntohs(trans->addr.sin_port), expire);
|
||||
ast_db_put("dundi/dpeers", dundi_eid_to_str_short(eid_str, sizeof(eid_str), &peer->eid), data);
|
||||
if (inaddrcmp(&peer->addr, &trans->addr)) {
|
||||
if (option_verbose > 2) {
|
||||
ast_verbose(VERBOSE_PREFIX_3 "Registered DUNDi peer '%s' at '%s:%d'\n",
|
||||
ast_verb(3, "Registered DUNDi peer '%s' at '%s:%d'\n",
|
||||
dundi_eid_to_str(eid_str, sizeof(eid_str), &peer->eid),
|
||||
ast_inet_ntoa(trans->addr.sin_addr), ntohs(trans->addr.sin_port));
|
||||
}
|
||||
needqual = 1;
|
||||
}
|
||||
|
||||
@@ -4796,10 +4794,7 @@ static int load_module(void)
|
||||
ast_custom_function_register(&dundi_query_function);
|
||||
ast_custom_function_register(&dundi_result_function);
|
||||
|
||||
if (option_verbose > 1) {
|
||||
ast_verbose(VERBOSE_PREFIX_2 "DUNDi Ready and Listening on %s port %d\n",
|
||||
ast_inet_ntoa(sin.sin_addr), ntohs(sin.sin_port));
|
||||
}
|
||||
ast_verb(2, "DUNDi Ready and Listening on %s port %d\n", ast_inet_ntoa(sin.sin_addr), ntohs(sin.sin_port));
|
||||
|
||||
return AST_MODULE_LOAD_SUCCESS;
|
||||
}
|
||||
|
@@ -313,8 +313,7 @@ static void exit_now(GtkWidget *widget, gpointer data)
|
||||
ast_update_use_count();
|
||||
ast_unregister_verbose(verboser);
|
||||
ast_unload_resource("pbx_gtkconsole", 0);
|
||||
if (option_verbose > 1)
|
||||
ast_verbose(VERBOSE_PREFIX_2 "GTK Console Monitor Exiting\n");
|
||||
ast_verb(2, "GTK Console Monitor Exiting\n");
|
||||
/* XXX Trying to quit after calling this makes asterisk segfault XXX */
|
||||
}
|
||||
|
||||
@@ -488,15 +487,14 @@ static int load_module(void *mod)
|
||||
if (!show_console()) {
|
||||
inuse++;
|
||||
ast_update_use_count();
|
||||
if (option_verbose > 1)
|
||||
ast_verbose( VERBOSE_PREFIX_2 "Launched GTK Console monitor\n");
|
||||
ast_verb(2, "Launched GTK Console monitor\n");
|
||||
} else
|
||||
ast_log(LOG_WARNING, "Unable to start GTK console\n");
|
||||
} else {
|
||||
if (option_debug)
|
||||
ast_log(LOG_DEBUG, "Unable to start GTK console monitor -- ignoring\n");
|
||||
else if (option_verbose > 1)
|
||||
ast_verbose( VERBOSE_PREFIX_2 "GTK is not available -- skipping monitor\n");
|
||||
else
|
||||
ast_verb(2, "GTK is not available -- skipping monitor\n");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@@ -198,8 +198,7 @@ static int realtime_exec(struct ast_channel *chan, const char *context, const ch
|
||||
|
||||
if(!ast_strlen_zero(tmp))
|
||||
pbx_substitute_variables_helper(chan, tmp, appdata, sizeof(appdata) - 1);
|
||||
if (option_verbose > 2)
|
||||
ast_verbose( VERBOSE_PREFIX_3 "Executing %s(\"%s\", \"%s\")\n",
|
||||
ast_verb(3, "Executing %s(\"%s\", \"%s\")\n",
|
||||
term_color(tmp1, app, COLOR_BRCYAN, 0, sizeof(tmp1)),
|
||||
term_color(tmp2, chan->name, COLOR_BRMAGENTA, 0, sizeof(tmp2)),
|
||||
term_color(tmp3, S_OR(appdata, ""), COLOR_BRMAGENTA, 0, sizeof(tmp3)));
|
||||
|
@@ -329,12 +329,10 @@ static void *attempt_thread(void *data)
|
||||
struct outgoing *o = data;
|
||||
int res, reason;
|
||||
if (!ast_strlen_zero(o->app)) {
|
||||
if (option_verbose > 2)
|
||||
ast_verbose(VERBOSE_PREFIX_3 "Attempting call on %s/%s for application %s(%s) (Retry %d)\n", o->tech, o->dest, o->app, o->data, o->retries);
|
||||
ast_verb(3, "Attempting call on %s/%s for application %s(%s) (Retry %d)\n", o->tech, o->dest, o->app, o->data, o->retries);
|
||||
res = ast_pbx_outgoing_app(o->tech, AST_FORMAT_SLINEAR, o->dest, o->waittime * 1000, o->app, o->data, &reason, 2 /* wait to finish */, o->cid_num, o->cid_name, o->vars, o->account, NULL);
|
||||
} else {
|
||||
if (option_verbose > 2)
|
||||
ast_verbose(VERBOSE_PREFIX_3 "Attempting call on %s/%s for %s@%s:%d (Retry %d)\n", o->tech, o->dest, o->exten, o->context,o->priority, o->retries);
|
||||
ast_verb(3, "Attempting call on %s/%s for %s@%s:%d (Retry %d)\n", o->tech, o->dest, o->exten, o->context,o->priority, o->retries);
|
||||
res = ast_pbx_outgoing_exten(o->tech, AST_FORMAT_SLINEAR, o->dest, o->waittime * 1000, o->context, o->exten, o->priority, &reason, 2 /* wait to finish */, o->cid_num, o->cid_name, o->vars, o->account, NULL);
|
||||
}
|
||||
if (res) {
|
||||
|
Reference in New Issue
Block a user