diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2007-12-14 14:48:38 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2007-12-14 14:48:38 +0000 |
commit | d5b454bf8d534e4c37e19148a22315c1c54b4a1e (patch) | |
tree | eb8395c48dfe42302c76abaf23fc722e7e6190bf /main | |
parent | c8759aff259c1593938899b49c6adc28be5306cd (diff) |
Convert ast_verbose to ast_verb.
Reported by: snuffy
Patch by: snuffy
(Closes issue #11547)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92913 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r-- | main/asterisk.c | 9 | ||||
-rw-r--r-- | main/netsock.c | 14 | ||||
-rw-r--r-- | main/pbx.c | 3 | ||||
-rw-r--r-- | main/srv.c | 4 |
4 files changed, 10 insertions, 20 deletions
diff --git a/main/asterisk.c b/main/asterisk.c index 95778bfe4..67dc361d0 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -986,8 +986,7 @@ static void *netconsole(void *vconsole) break; } } - if (option_verbose > 2) - ast_verbose(VERBOSE_PREFIX_3 "Remote UNIX connection disconnected\n"); + ast_verb(3, "Remote UNIX connection disconnected\n"); close(con->fd); close(con->p[0]); close(con->p[1]); @@ -1050,10 +1049,8 @@ static void *listener(void *unused) fdprint(s, "No more connections allowed\n"); ast_log(LOG_WARNING, "No more connections allowed\n"); close(s); - } else if (consoles[x].fd > -1) { - if (option_verbose > 2) - ast_verbose(VERBOSE_PREFIX_3 "Remote UNIX connection\n"); - } + } else if (consoles[x].fd > -1) + ast_verb(3, "Remote UNIX connection\n"); } } return NULL; diff --git a/main/netsock.c b/main/netsock.c index b5b6999f6..d10c0c344 100644 --- a/main/netsock.c +++ b/main/netsock.c @@ -149,18 +149,14 @@ int ast_netsock_set_qos(int netsocket, int tos, int cos) if ((res = setsockopt(netsocket, IPPROTO_IP, IP_TOS, &tos, sizeof(tos)))) ast_log(LOG_WARNING, "Unable to set TOS to %d\n", tos); - else { - if (option_verbose > 1) - ast_verbose(VERBOSE_PREFIX_2 "Using TOS bits %d\n", tos); - } + else + ast_verb(2, "Using TOS bits %d\n", tos); #if defined(linux) if (setsockopt(netsocket, SOL_SOCKET, SO_PRIORITY, &cos, sizeof(cos))) - ast_log(LOG_WARNING, "Unable to set CoS to %d\n", cos); - else { - if (option_verbose > 1) - ast_verbose(VERBOSE_PREFIX_2 "Using CoS mark %d\n", cos); - } + ast_log(LOG_WARNING, "Unable to set CoS to %d\n", cos); + else + ast_verb(2, "Using CoS mark %d\n", cos); #endif return res; diff --git a/main/pbx.c b/main/pbx.c index e40c274c9..e0a55ef3a 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -3294,8 +3294,7 @@ static int __ast_pbx_run(struct ast_channel *c) if ((res == AST_PBX_ERROR) && ast_exists_extension(c, c->context, "e", 1, c->cid.cid_num)) { /* if we are already on the 'e' exten, don't jump to it again */ if (!strcmp(c->exten, "e")) { - if (option_verbose > 1) - ast_verbose(VERBOSE_PREFIX_2 "Spawn extension (%s, %s, %d) exited ERROR while already on 'e' exten on '%s'\n", c->context, c->exten, c->priority, c->name); + ast_verb(2, "Spawn extension (%s, %s, %d) exited ERROR while already on 'e' exten on '%s'\n", c->context, c->exten, c->priority, c->name); error = 1; } else { pbx_builtin_raise_exception(c, "ERROR"); diff --git a/main/srv.c b/main/srv.c index 644bf757b..3950e255f 100644 --- a/main/srv.c +++ b/main/srv.c @@ -224,10 +224,8 @@ int ast_get_srv(struct ast_channel *chan, char *host, int hostlen, int *port, co ast_copy_string(host, current->host, hostlen); *port = current->port; ast_free(current); - if (option_verbose > 3) { - ast_verbose(VERBOSE_PREFIX_3 "ast_get_srv: SRV lookup for '%s' mapped to host %s, port %d\n", + ast_verb(3, "ast_get_srv: SRV lookup for '%s' mapped to host %s, port %d\n", service, host, *port); - } } else { host[0] = '\0'; *port = -1; |