[asterisk-commits] oej: branch group/pinequeue r311977 - /team/group/pinequeue/main/channel.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Mar 31 07:14:01 CDT 2011
Author: oej
Date: Thu Mar 31 07:13:42 2011
New Revision: 311977
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=311977
Log:
Clean up some debugging
Modified:
team/group/pinequeue/main/channel.c
Modified: team/group/pinequeue/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pinequeue/main/channel.c?view=diff&rev=311977&r1=311976&r2=311977
==============================================================================
--- team/group/pinequeue/main/channel.c (original)
+++ team/group/pinequeue/main/channel.c Thu Mar 31 07:13:42 2011
@@ -1957,7 +1957,7 @@
ast_settimeout(chan, 0, NULL, NULL);
}
ast_channel_unlock(chan);
- ast_log(LOG_DEBUG, "ast_deactivate_generator() done on chan %s\n", chan->name);
+ ast_debug(3, "ast_deactivate_generator() done on chan %s\n", chan->name);
}
static int generator_force(const void *data)
@@ -1977,7 +1977,7 @@
ast_debug(3, "GENERATOR_FORCE: generate() CALLED res=%d on chan %s\n", res, chan->name);
if (!tmp || !generate) {
- ast_log(LOG_ERROR, "--- Can't find generator data or generator function \n");
+ ast_log(LOG_ERROR, "Can't find generator data or generator function \n");
return 0;
}
@@ -1997,7 +1997,6 @@
{
int res = 0;
- ast_log(LOG_DEBUG,"In the activate_generator func. gen->alloc = %p on chan %s\n", gen->alloc, chan->name);
ast_channel_lock(chan);
if (chan->generatordata) {
if (chan->generator && chan->generator->release)
@@ -2009,11 +2008,9 @@
res = -1;
}
if (!res) {
- ast_debug(3,"About to settimeout for generator_force on chan %s\n", chan->name);
ast_settimeout(chan, 160, generator_force, chan);
chan->generator = gen;
}
- ast_log(LOG_ERROR,"Leaving the activate_generator, res=%d on chan %s\n", res, chan->name);
ast_channel_unlock(chan);
ast_prod(chan);
@@ -2534,8 +2531,7 @@
int samples;
if (chan->timingfunc) {
- if (option_debug > 1)
- ast_log(LOG_DEBUG, "Generator got voice, switching to phase locked mode\n");
+ ast_debug(2, "Generator got voice, switching to phase locked mode\n");
ast_settimeout(chan, 0, NULL, NULL);
}
@@ -2564,15 +2560,13 @@
chan->generatordata = tmp;
ast_debug(3, "--- Reactivating generator \n");
if (res) {
- if (option_debug > 1)
- ast_log(LOG_DEBUG, "Auto-deactivating generator\n");
+ ast_debug(2, "Auto-deactivating generator\n");
ast_deactivate_generator(chan);
}
} else if (f->frametype == AST_FRAME_CNG) {
if (chan->generator && !chan->timingfunc && (chan->timingfd > -1)) {
- if (option_debug > 1)
- ast_log(LOG_DEBUG, "Generator got CNG, switching to timed mode\n");
+ ast_debug(2, "Generator got CNG, switching to timed mode\n");
ast_settimeout(chan, 160, generator_force, chan);
}
}
More information about the asterisk-commits
mailing list