[asterisk-commits] jpeeler: branch jpeeler/asterisk-sigwork-trunk r193046 - /team/jpeeler/asteri...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu May 7 15:13:49 CDT 2009
Author: jpeeler
Date: Thu May 7 15:13:45 2009
New Revision: 193046
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=193046
Log:
convert all non-temporary debug messages to use ast_debug
Modified:
team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c
team/jpeeler/asterisk-sigwork-trunk/channels/sig_analog.c
Modified: team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c?view=diff&rev=193046&r1=193045&r2=193046
==============================================================================
--- team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c (original)
+++ team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c Thu May 7 15:13:45 2009
@@ -1769,8 +1769,7 @@
struct dahdi_pvt *p = pvt;
int index = analogsub_to_dahdisub(analog_index);
- if (option_debug)
- ast_log(LOG_DEBUG, "DTMF digit: %c on %s\n", f->subclass, ast->name);
+ ast_debug(1, "DTMF digit: %c on %s\n", f->subclass, ast->name);
if (f->subclass == 'f') {
/* Fax tone -- Handle and return NULL */
@@ -7429,12 +7428,10 @@
case SIG_SF_FEATD:
case SIG_FXSLS:
case SIG_FXSGS:
- if (option_debug) {
- if (p->dialing)
- ast_debug(1, "Ignoring wink on channel %d\n", p->channel);
- else
- ast_debug(1, "Got wink in weird state %d on channel %d\n", ast->_state, p->channel);
- }
+ if (p->dialing)
+ ast_debug(1, "Ignoring wink on channel %d\n", p->channel);
+ else
+ ast_debug(1, "Got wink in weird state %d on channel %d\n", ast->_state, p->channel);
break;
case SIG_FEATDMF_TA:
switch (p->whichwink) {
Modified: team/jpeeler/asterisk-sigwork-trunk/channels/sig_analog.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/jpeeler/asterisk-sigwork-trunk/channels/sig_analog.c?view=diff&rev=193046&r1=193045&r2=193046
==============================================================================
--- team/jpeeler/asterisk-sigwork-trunk/channels/sig_analog.c (original)
+++ team/jpeeler/asterisk-sigwork-trunk/channels/sig_analog.c Thu May 7 15:13:45 2009
@@ -241,7 +241,7 @@
int tinthreeway;
struct ast_channel *towner;
- ast_log(LOG_DEBUG, "Swapping %d and %d\n", a, b);
+ ast_debug(1, "Swapping %d and %d\n", a, b);
towner = p->subs[a].owner;
tinthreeway = p->subs[a].inthreeway;
@@ -278,9 +278,7 @@
static int analog_send_callerid(struct analog_pvt *p, int cwcid, struct ast_callerid *cid)
{
- if (option_debug) {
- ast_log(LOG_DEBUG, "Sending callerid. CID_NAME: '%s' CID_NUM: '%s'\n", cid->cid_name, cid->cid_num);
- }
+ ast_debug(1, "Sending callerid. CID_NAME: '%s' CID_NUM: '%s'\n", cid->cid_name, cid->cid_num);
if (cwcid) {
p->callwaitcas = 0;
@@ -513,7 +511,7 @@
/* Tell the caller not to hangup */
return 1;
} else {
- ast_log(LOG_DEBUG, "Neither %s nor %s are in a bridge, nothing to transfer\n",
+ ast_debug(1, "Neither %s nor %s are in a bridge, nothing to transfer\n",
p->subs[ANALOG_SUB_REAL].owner->name, p->subs[ANALOG_SUB_THREEWAY].owner->name);
ast_softhangup_nolock(p->subs[ANALOG_SUB_THREEWAY].owner, AST_SOFTHANGUP_DEV);
return -1;
@@ -538,8 +536,7 @@
p->calls->conf_del(p->chan_pvt, x);
}
}
- if (option_debug)
- ast_log(LOG_DEBUG, "Updated conferencing on %d, with %d conference users\n", p->channel, needconf);
+ ast_debug(1, "Updated conferencing on %d, with %d conference users\n", p->channel, needconf);
if (p->calls->complete_conference_update)
p->calls->complete_conference_update(p->chan_pvt, needconf);
@@ -594,7 +591,7 @@
else
return 0;
} else if (offhook) {
- ast_log(LOG_DEBUG, "Channel %d off hook, can't use\n", p->channel);
+ ast_debug(1, "Channel %d off hook, can't use\n", p->channel);
/* Not available when the other end is off hook */
return 0;
}
@@ -711,7 +708,7 @@
if (c) {
p->dop.op = ANALOG_DIAL_OP_REPLACE;
snprintf(p->dop.dialstr, sizeof(p->dop.dialstr), "Tw%s", c);
- ast_log(LOG_DEBUG, "FXO: setup deferred dialstring: %s\n", c);
+ ast_debug(1, "FXO: setup deferred dialstring: %s\n", c);
} else {
p->dop.dialstr[0] = '\0';
}
@@ -874,14 +871,14 @@
return -1;
}
} else
- ast_log(LOG_DEBUG, "Deferring dialing...\n");
+ ast_debug(1, "Deferring dialing...\n");
p->dialing = 1;
if (ast_strlen_zero(c))
p->dialednone = 1;
ast_setstate(ast, AST_STATE_DIALING);
break;
default:
- ast_log(LOG_DEBUG, "not yet implemented\n");
+ ast_debug(1, "not yet implemented\n");
return -1;
}
return 0;
@@ -914,8 +911,7 @@
analog_dsp_set_digitmode(p, ANALOG_DIGITMODE_DTMF);
- if (option_debug)
- ast_log(LOG_DEBUG, "Hangup: channel: %d index = %d, normal = %d, callwait = %d, thirdcall = %d\n",
+ ast_debug(1, "Hangup: channel: %d index = %d, normal = %d, callwait = %d, thirdcall = %d\n",
p->channel, index, p->subs[ANALOG_SUB_REAL].allocd, p->subs[ANALOG_SUB_CALLWAIT].allocd, p->subs[ANALOG_SUB_THREEWAY].allocd);
if (index > -1) {
/* Real channel, do some fixup */
@@ -924,27 +920,27 @@
p->polarity = POLARITY_IDLE;
if (index == ANALOG_SUB_REAL) {
if (p->subs[ANALOG_SUB_CALLWAIT].allocd && p->subs[ANALOG_SUB_THREEWAY].allocd) {
- ast_log(LOG_DEBUG, "Normal call hung up with both three way call and a call waiting call in place?\n");
+ ast_debug(1, "Normal call hung up with both three way call and a call waiting call in place?\n");
if (p->subs[ANALOG_SUB_CALLWAIT].inthreeway) {
/* We had flipped over to answer a callwait and now it's gone */
- ast_log(LOG_DEBUG, "We were flipped over to the callwait, moving back and unowning.\n");
+ ast_debug(1, "We were flipped over to the callwait, moving back and unowning.\n");
/* Move to the call-wait, but un-own us until they flip back. */
analog_swap_subs(p, ANALOG_SUB_CALLWAIT, ANALOG_SUB_REAL);
analog_unalloc_sub(p, ANALOG_SUB_CALLWAIT);
p->owner = NULL;
} else {
/* The three way hung up, but we still have a call wait */
- ast_log(LOG_DEBUG, "We were in the threeway and have a callwait still. Ditching the threeway.\n");
+ ast_debug(1, "We were in the threeway and have a callwait still. Ditching the threeway.\n");
analog_swap_subs(p, ANALOG_SUB_THREEWAY, ANALOG_SUB_REAL);
analog_unalloc_sub(p, ANALOG_SUB_THREEWAY);
if (p->subs[ANALOG_SUB_REAL].inthreeway) {
/* This was part of a three way call. Immediately make way for
another call */
- ast_log(LOG_DEBUG, "Call was complete, setting owner to former third call\n");
+ ast_debug(1, "Call was complete, setting owner to former third call\n");
p->owner = p->subs[ANALOG_SUB_REAL].owner;
} else {
/* This call hasn't been completed yet... Set owner to NULL */
- ast_log(LOG_DEBUG, "Call was incomplete, setting owner to NULL\n");
+ ast_debug(1, "Call was incomplete, setting owner to NULL\n");
p->owner = NULL;
}
p->subs[ANALOG_SUB_REAL].inthreeway = 0;
@@ -964,11 +960,11 @@
if (p->subs[ANALOG_SUB_REAL].inthreeway) {
/* This was part of a three way call. Immediately make way for
another call */
- ast_log(LOG_DEBUG, "Call was complete, setting owner to former third call\n");
+ ast_debug(1, "Call was complete, setting owner to former third call\n");
p->owner = p->subs[ANALOG_SUB_REAL].owner;
} else {
/* This call hasn't been completed yet... Set owner to NULL */
- ast_log(LOG_DEBUG, "Call was incomplete, setting owner to NULL\n");
+ ast_debug(1, "Call was incomplete, setting owner to NULL\n");
p->owner = NULL;
}
p->subs[ANALOG_SUB_REAL].inthreeway = 0;
@@ -1110,7 +1106,7 @@
case ANALOG_SIG_FXOGS:
case ANALOG_SIG_FXOKS:
/* Pick up the line */
- ast_log(LOG_DEBUG, "Took %s off hook\n", ast->name);
+ ast_debug(1, "Took %s off hook\n", ast->name);
if (p->hanguponpolarityswitch) {
gettimeofday(&p->polaritydelaytv, NULL);
}
@@ -1119,7 +1115,7 @@
p->dialing = 0;
if ((index == ANALOG_SUB_REAL) && p->subs[ANALOG_SUB_THREEWAY].inthreeway) {
if (oldstate == AST_STATE_RINGING) {
- ast_log(LOG_DEBUG, "Finally swapping real and threeway\n");
+ ast_debug(1, "Finally swapping real and threeway\n");
analog_play_tone(p, ANALOG_SUB_THREEWAY, -1);
analog_swap_subs(p, ANALOG_SUB_THREEWAY, ANALOG_SUB_REAL);
p->owner = p->subs[ANALOG_SUB_REAL].owner;
@@ -1369,7 +1365,7 @@
}
res = ast_waitfordigit(chan, timeout);
if (res < 0) {
- ast_log(LOG_DEBUG, "waitfordigit returned < 0...\n");
+ ast_debug(1, "waitfordigit returned < 0...\n");
ast_hangup(chan);
return NULL;
} else if (res) {
@@ -1387,7 +1383,7 @@
ast_hangup(chan);
return NULL;
} else if (res < 0) {
- ast_log(LOG_DEBUG, "Got hung up before digits finished\n");
+ ast_debug(1, "Got hung up before digits finished\n");
ast_hangup(chan);
return NULL;
}
@@ -1536,7 +1532,7 @@
res = ast_waitfordigit(chan, timeout);
timeout = 0;
if (res < 0) {
- ast_log(LOG_DEBUG, "waitfordigit returned < 0...\n");
+ ast_debug(1, "waitfordigit returned < 0...\n");
res = analog_play_tone(p, index, -1);
ast_hangup(chan);
return NULL;
@@ -1593,7 +1589,7 @@
timeout = analog_matchdigittimeout;
}
} else if (res == 0) {
- ast_log(LOG_DEBUG, "not enough digits (and no ambiguous match)...\n");
+ ast_debug(1, "not enough digits (and no ambiguous match)...\n");
res = analog_play_tone(p, index, ANALOG_TONE_CONGESTION);
analog_wait_event(p);
ast_hangup(chan);
@@ -1628,7 +1624,7 @@
}
analog_set_echocanceller(p, 1);
if (ast_pickup_call(chan)) {
- ast_log(LOG_DEBUG, "No call pickup possible...\n");
+ ast_debug(1, "No call pickup possible...\n");
res = analog_play_tone(p, index, ANALOG_TONE_CONGESTION);
analog_wait_event(p);
}
@@ -1786,8 +1782,7 @@
#endif
} else if (!ast_canmatch_extension(chan, chan->context, exten, 1, chan->cid.cid_num) &&
((exten[0] != '*') || (strlen(exten) > 2))) {
- if (option_debug)
- ast_log(LOG_DEBUG, "Can't match %s from '%s' in context %s\n", exten, chan->cid.cid_num ? chan->cid.cid_num : "<Unknown Caller>", chan->context);
+ ast_debug(1, "Can't match %s from '%s' in context %s\n", exten, chan->cid.cid_num ? chan->cid.cid_num : "<Unknown Caller>", chan->context);
break;
}
if (!timeout)
@@ -1808,7 +1803,7 @@
if (p->cid_signalling == CID_SIG_DTMF) {
int i = 0;
cs = NULL;
- ast_log(LOG_DEBUG, "Receiving DTMF cid on "
+ ast_debug(1, "Receiving DTMF cid on "
"channel %s\n", chan->name);
#if 0
dahdi_setlinear(p->subs[index].dfd, 0);
@@ -1828,7 +1823,7 @@
break;
if (f->frametype == AST_FRAME_DTMF) {
dtmfbuf[i++] = f->subclass;
- ast_log(LOG_DEBUG, "CID got digit '%c'\n", f->subclass);
+ ast_debug(1, "CID got digit '%c'\n", f->subclass);
res = 2000;
}
ast_frfree(f);
@@ -1841,9 +1836,9 @@
dahdi_setlinear(p->subs[index].dfd, p->subs[index].linear);
#endif
/* Got cid and ring. */
- ast_log(LOG_DEBUG, "CID got string '%s'\n", dtmfbuf);
+ ast_debug(1, "CID got string '%s'\n", dtmfbuf);
callerid_get_dtmf(dtmfbuf, dtmfcid, &flags);
- ast_log(LOG_DEBUG, "CID is '%s', flags %d\n",
+ ast_debug(1, "CID is '%s', flags %d\n",
dtmfcid, flags);
/* If first byte is NULL, we have no cid */
if (!ast_strlen_zero(dtmfcid))
More information about the asterisk-commits
mailing list