aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_musiconhold.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-26 15:49:18 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-26 15:49:18 +0000
commit4f3c4dc7f238b64a21172be86266311c9c645c77 (patch)
treede4bd130dafa592858306d2ac6bcc5f85fd51cc8 /res/res_musiconhold.c
parent07772bc9e3ef6636a3e99e07d2aea3a06988f0c9 (diff)
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: http://svn.digium.com/svn/asterisk/trunk@77299 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_musiconhold.c')
-rw-r--r--res/res_musiconhold.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c
index 84a44f3b7..8f51e77af 100644
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -202,8 +202,7 @@ static void moh_files_release(struct ast_channel *chan, void *data)
ast_closestream(chan->stream);
chan->stream = NULL;
}
- if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "Stopped music on hold on %s\n", chan->name);
+ ast_verb(3, "Stopped music on hold on %s\n", chan->name);
if (state->origwfmt && ast_set_write_format(chan, state->origwfmt)) {
ast_log(LOG_WARNING, "Unable to restore channel '%s' to format '%d'\n", chan->name, state->origwfmt);
@@ -318,8 +317,7 @@ static void *moh_files_alloc(struct ast_channel *chan, void *params)
state->origwfmt = chan->writeformat;
- if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "Started music on hold, class '%s', on %s\n", class->name, chan->name);
+ ast_verb(3, "Started music on hold, class '%s', on %s\n", class->name, chan->name);
}
return chan->music_state;
@@ -719,8 +717,7 @@ static void moh_release(struct ast_channel *chan, void *data)
if (chan) {
if (oldwfmt && ast_set_write_format(chan, oldwfmt))
ast_log(LOG_WARNING, "Unable to restore channel '%s' to format %s\n", chan->name, ast_getformatname(oldwfmt));
- if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "Stopped music on hold on %s\n", chan->name);
+ ast_verb(3, "Stopped music on hold on %s\n", chan->name);
}
}
@@ -736,8 +733,7 @@ static void *moh_alloc(struct ast_channel *chan, void *params)
moh_release(NULL, res);
res = NULL;
}
- if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "Started music on hold, class '%s', on channel '%s'\n", class->name, chan->name);
+ ast_verb(3, "Started music on hold, class '%s', on channel '%s'\n", class->name, chan->name);
}
return res;
}
@@ -1091,8 +1087,7 @@ static void ast_moh_destroy(void)
char buff[8192];
int bytes, tbytes = 0, stime = 0, pid = 0;
- if (option_verbose > 1)
- ast_verbose(VERBOSE_PREFIX_2 "Destroying musiconhold processes\n");
+ ast_verb(2, "Destroying musiconhold processes\n");
AST_RWLIST_WRLOCK(&mohclasses);
while ((moh = AST_RWLIST_REMOVE_HEAD(&mohclasses, list))) {