[asterisk-commits] rmudgett: branch group/issue14068 r210153 - in /team/group/issue14068: ./ cha...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Aug 3 12:24:26 CDT 2009
Author: rmudgett
Date: Mon Aug 3 12:24:21 2009
New Revision: 210153
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=210153
Log:
Merged revisions 210094 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r210094 | rmudgett | 2009-08-03 11:24:13 -0500 (Mon, 03 Aug 2009) | 1 line
Trim trailing whitespace.
........
Modified:
team/group/issue14068/ (props changed)
team/group/issue14068/channels/sig_analog.c
team/group/issue14068/channels/sig_pri.c
team/group/issue14068/channels/sig_pri.h
Propchange: team/group/issue14068/
------------------------------------------------------------------------------
automerge = *
Propchange: team/group/issue14068/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Aug 3 12:24:21 2009
@@ -1,1 +1,1 @@
-/trunk:1-210081
+/trunk:1-210149
Modified: team/group/issue14068/channels/sig_analog.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/issue14068/channels/sig_analog.c?view=diff&rev=210153&r1=210152&r2=210153
==============================================================================
--- team/group/issue14068/channels/sig_analog.c (original)
+++ team/group/issue14068/channels/sig_analog.c Mon Aug 3 12:24:21 2009
@@ -17,7 +17,7 @@
*/
/*! \file
- *
+ *
* \brief Analog signaling module
*
* \author Matthew Fredrickson <creslin at digium.com>
@@ -618,7 +618,7 @@
if (p->dnd)
return 0;
/* If guard time, definitely not */
- if (p->guardtime && (time(NULL) < p->guardtime))
+ if (p->guardtime && (time(NULL) < p->guardtime))
return 0;
/* If no owner definitely available */
@@ -645,7 +645,7 @@
}
/* If it's not an FXO, forget about call wait */
- if ((p->sig != ANALOG_SIG_FXOKS) && (p->sig != ANALOG_SIG_FXOLS) && (p->sig != ANALOG_SIG_FXOGS))
+ if ((p->sig != ANALOG_SIG_FXOKS) && (p->sig != ANALOG_SIG_FXOLS) && (p->sig != ANALOG_SIG_FXOGS))
return 0;
if (!p->callwaiting) {
@@ -854,14 +854,14 @@
switch (mysig) {
case ANALOG_SIG_FEATD:
l = ast->connected.id.number;
- if (l)
+ if (l)
snprintf(p->dop.dialstr, sizeof(p->dop.dialstr), "T*%s*%s*", l, c);
else
snprintf(p->dop.dialstr, sizeof(p->dop.dialstr), "T**%s*", c);
break;
case ANALOG_SIG_FEATDMF:
l = ast->connected.id.number;
- if (l)
+ if (l)
snprintf(p->dop.dialstr, sizeof(p->dop.dialstr), "M*00%s#*%s#", l, c);
else
snprintf(p->dop.dialstr, sizeof(p->dop.dialstr), "M*02#*%s#", c);
@@ -1027,7 +1027,7 @@
/* This is actually part of a three way, placed on hold. Place the third part
on music on hold now */
if (p->subs[ANALOG_SUB_THREEWAY].owner && ast_bridged_channel(p->subs[ANALOG_SUB_THREEWAY].owner)) {
- ast_queue_control_data(p->subs[ANALOG_SUB_THREEWAY].owner, AST_CONTROL_HOLD,
+ ast_queue_control_data(p->subs[ANALOG_SUB_THREEWAY].owner, AST_CONTROL_HOLD,
S_OR(p->mohsuggest, NULL),
!ast_strlen_zero(p->mohsuggest) ? strlen(p->mohsuggest) + 1 : 0);
}
@@ -1042,7 +1042,7 @@
/* The other party of the three way call is currently in a call-wait state.
Start music on hold for them, and take the main guy out of the third call */
if (p->subs[ANALOG_SUB_CALLWAIT].owner && ast_bridged_channel(p->subs[ANALOG_SUB_CALLWAIT].owner)) {
- ast_queue_control_data(p->subs[ANALOG_SUB_CALLWAIT].owner, AST_CONTROL_HOLD,
+ ast_queue_control_data(p->subs[ANALOG_SUB_CALLWAIT].owner, AST_CONTROL_HOLD,
S_OR(p->mohsuggest, NULL),
!ast_strlen_zero(p->mohsuggest) ? strlen(p->mohsuggest) + 1 : 0);
}
@@ -1623,12 +1623,12 @@
timeout = analog_firstdigittimeout;
/* If starting a threeway call, never timeout on the first digit so someone
can use flash-hook as a "hold" feature */
- if (p->subs[ANALOG_SUB_THREEWAY].owner)
+ if (p->subs[ANALOG_SUB_THREEWAY].owner)
timeout = 999999;
while (len < AST_MAX_EXTENSION-1) {
/* Read digit unless it's supposed to be immediate, in which case the
only answer is 's' */
- if (p->immediate)
+ if (p->immediate)
res = 's';
else
res = ast_waitfordigit(chan, timeout);
@@ -1650,7 +1650,7 @@
if (!res || !ast_matchmore_extension(chan, chan->context, exten, 1, p->cid_num)) {
if (getforward) {
/* Record this as the forwarding extension */
- ast_copy_string(p->call_forward, exten, sizeof(p->call_forward));
+ ast_copy_string(p->call_forward, exten, sizeof(p->call_forward));
ast_verb(3, "Setting call forward to '%s' on channel %d\n", p->call_forward, p->channel);
res = analog_play_tone(p, index, ANALOG_TONE_DIALRECALL);
if (res)
@@ -1667,9 +1667,9 @@
ast_copy_string(chan->exten, exten, sizeof(chan->exten));
if (!ast_strlen_zero(p->cid_num)) {
if (!p->hidecallerid)
- ast_set_callerid(chan, p->cid_num, NULL, p->cid_num);
+ ast_set_callerid(chan, p->cid_num, NULL, p->cid_num);
else
- ast_set_callerid(chan, NULL, NULL, p->cid_num);
+ ast_set_callerid(chan, NULL, NULL, p->cid_num);
}
if (!ast_strlen_zero(p->cid_name)) {
if (!p->hidecallerid)
@@ -1701,7 +1701,7 @@
p->callwaiting = 0;
res = analog_play_tone(p, index, ANALOG_TONE_DIALRECALL);
if (res) {
- ast_log(LOG_WARNING, "Unable to do dial recall on channel %s: %s\n",
+ ast_log(LOG_WARNING, "Unable to do dial recall on channel %s: %s\n",
chan->name, strerror(errno));
}
len = 0;
@@ -1941,7 +1941,7 @@
if (!analog_start_cid_detect(p, p->cid_signalling)) {
while (1) {
res = analog_get_callerid(p, namebuf, numbuf, &ev, timeout - ast_tvdiff_ms(ast_tvnow(), start));
-
+
if (res == 0) {
break;
}
@@ -1951,20 +1951,20 @@
if (ev == ANALOG_EVENT_RINGBEGIN) {
analog_off_hook(p);
usleep(1);
- }
+ }
} else {
ev = ANALOG_EVENT_NONE;
break;
}
}
-
+
if (ast_tvdiff_ms(ast_tvnow(), start) > timeout)
break;
-
+
}
name = namebuf;
number = numbuf;
-
+
analog_stop_cid_detect(p);
if (p->cid_signalling == CID_SIG_V23_JP) {
@@ -1998,7 +1998,7 @@
if (analog_distinctive_ring(chan, p, index, NULL))
goto quit;
-
+
if (res < 0) {
ast_log(LOG_WARNING, "CallerID returned with error on channel '%s'\n", chan->name);
}
@@ -2009,7 +2009,7 @@
ast_log(LOG_WARNING, "Channel %s in prering "
"state, but I have nothing to do. "
"Terminating simple switch, should be "
- "restarted by the actual ring.\n",
+ "restarted by the actual ring.\n",
chan->name);
ast_hangup(chan);
goto quit;
@@ -2038,7 +2038,7 @@
p->polarity = POLARITY_IDLE;
ast_hangup(chan);
goto quit;
- } else if (ev != ANALOG_EVENT_NONE && ev != ANALOG_EVENT_RINGBEGIN && ev != ANALOG_EVENT_RINGOFFHOOK) {
+ } else if (ev != ANALOG_EVENT_NONE && ev != ANALOG_EVENT_RINGBEGIN && ev != ANALOG_EVENT_RINGOFFHOOK) {
break;
}
if (res != 2) {
@@ -2595,7 +2595,7 @@
if (p->subs[ANALOG_SUB_THREEWAY].owner->cdr)
cdr3way = 1;
-
+
ast_verb(3, "Started three way call on channel %d\n", p->channel);
/* Start music on hold if appropriate */
if (ast_bridged_channel(p->subs[ANALOG_SUB_THREEWAY].owner)) {
@@ -2624,7 +2624,7 @@
p->subs[ANALOG_SUB_THREEWAY].inthreeway = 0;
} else {
/* Lets see what we're up to */
- if (((ast->pbx) || (ast->_state == AST_STATE_UP)) &&
+ if (((ast->pbx) || (ast->_state == AST_STATE_UP)) &&
(p->transfertobusy || (ast->_state != AST_STATE_BUSY))) {
int otherindex = ANALOG_SUB_THREEWAY;
struct ast_channel *other = ast_bridged_channel(p->subs[ANALOG_SUB_THREEWAY].owner);
@@ -2739,7 +2739,7 @@
ast_log(LOG_WARNING, "Unable to initiate dialing on trunk channel %d: %s\n", p->channel, strerror(errno));
p->dop.dialstr[0] = '\0';
return NULL;
- } else
+ } else
ast_debug(1, "Sent deferred digit string on channel %d: %s\n", p->channel, p->dop.dialstr);
}
p->dop.dialstr[0] = '\0';
@@ -2768,7 +2768,7 @@
* mark the channel as UP or if this is an indication
* of remote end disconnect.
*/
-
+
if (p->polarityonanswerdelay > 0) {
/* check if event is not too soon after OffHook or Answer */
@@ -2827,7 +2827,7 @@
}
break;
- default:
+ default:
if (p->answeronpolarityswitch || p->hanguponpolarityswitch) {
ast_debug(1, "Polarity switch detected (too close to previous event) on channel %d, state %d\n", p->channel, ast->_state);
}
Modified: team/group/issue14068/channels/sig_pri.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/issue14068/channels/sig_pri.c?view=diff&rev=210153&r1=210152&r2=210153
==============================================================================
--- team/group/issue14068/channels/sig_pri.c (original)
+++ team/group/issue14068/channels/sig_pri.c Mon Aug 3 12:24:21 2009
@@ -17,7 +17,7 @@
*/
/*! \file
- *
+ *
* \brief PRI signaling module
*
* \author Matthew Fredrickson <creslin at digium.com>
@@ -465,7 +465,7 @@
return "Quaternary";
default:
return "<Unknown>";
- }
+ }
}
/* Returns index of the active dchan */
@@ -560,7 +560,7 @@
break;
}
}
-
+
return principle;
}
@@ -572,9 +572,9 @@
return -1;
return principle;
}
- if ((principle > -1) &&
- (principle < pri->numchans) &&
- (pri->pvts[principle]) &&
+ if ((principle > -1) &&
+ (principle < pri->numchans) &&
+ (pri->pvts[principle]) &&
(pri->pvts[principle]->call == c))
return principle;
/* First, check for other bearers */
@@ -713,7 +713,7 @@
if (!backwards && (x >= pri->numchans))
break;
if (pri->pvts[x] && !pri->pvts[x]->inalarm && !pri->pvts[x]->owner) {
- ast_debug(1, "Found empty available channel %d/%d\n",
+ ast_debug(1, "Found empty available channel %d/%d\n",
pri->pvts[x]->logicalspan, pri->pvts[x]->prioffset);
return x;
}
@@ -1075,7 +1075,7 @@
int nextidle = -1;
int haveidles;
int activeidles;
-
+
gettimeofday(&lastidle, NULL);
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
@@ -1124,7 +1124,7 @@
haveidles = 0;
activeidles = 0;
for (x = pri->numchans; x >= 0; x--) {
- if (pri->pvts[x] && !pri->pvts[x]->owner &&
+ if (pri->pvts[x] && !pri->pvts[x]->owner &&
!pri->pvts[x]->call) {
if (haveidles < pri->minunused) {
haveidles++;
@@ -1152,7 +1152,7 @@
}
} else if ((haveidles < pri->minunused) &&
(activeidles > pri->minidle)) {
- /* Mark something for hangup if there is something
+ /* Mark something for hangup if there is something
that can be hungup */
for (x = pri->numchans; x >= 0; x--) {
/* find a candidate channel */
@@ -1164,7 +1164,7 @@
if ((haveidles >= pri->minunused) ||
(activeidles <= pri->minidle))
break;
- }
+ }
}
}
}
@@ -1308,13 +1308,13 @@
if (e->restart.channel > -1) {
chanpos = pri_find_principle(pri, e->restart.channel);
if (chanpos < 0)
- ast_log(LOG_WARNING, "Restart requested on odd/unavailable channel number %d/%d on span %d\n",
+ ast_log(LOG_WARNING, "Restart requested on odd/unavailable channel number %d/%d on span %d\n",
PRI_SPAN(e->restart.channel), PRI_CHANNEL(e->restart.channel), pri->span);
else {
#ifdef HAVE_PRI_SERVICE_MESSAGES
char db_chan_name[20], db_answer[5], state;
int why, skipit = 0;
-
+
ast_mutex_lock(&pri->pvts[chanpos]->service_lock);
snprintf(db_chan_name, sizeof(db_chan_name), "%s/%d:%d", dahdi_db, pri->pvts[chanpos]->pri->span, pri->pvts[chanpos]->channel);
ast_mutex_unlock(&pri->pvts[chanpos]->service_lock);
@@ -1331,7 +1331,7 @@
}
if (!skipit) {
#endif
- ast_verb(3, "B-channel %d/%d restarted on span %d\n",
+ ast_verb(3, "B-channel %d/%d restarted on span %d\n",
PRI_SPAN(e->restart.channel), PRI_CHANNEL(e->restart.channel), pri->span);
sig_pri_lock_private(pri->pvts[chanpos]);
if (pri->pvts[chanpos]->call) {
@@ -1364,7 +1364,7 @@
case PRI_EVENT_KEYPAD_DIGIT:
chanpos = pri_find_principle(pri, e->digit.channel);
if (chanpos < 0) {
- ast_log(LOG_WARNING, "KEYPAD_DIGITs received on unconfigured channel %d/%d span %d\n",
+ ast_log(LOG_WARNING, "KEYPAD_DIGITs received on unconfigured channel %d/%d span %d\n",
PRI_SPAN(e->digit.channel), PRI_CHANNEL(e->digit.channel), pri->span);
} else {
chanpos = pri_fixup_principle(pri, chanpos, e->digit.call);
@@ -1390,11 +1390,11 @@
}
}
break;
-
+
case PRI_EVENT_INFO_RECEIVED:
chanpos = pri_find_principle(pri, e->ring.channel);
if (chanpos < 0) {
- ast_log(LOG_WARNING, "INFO received on unconfigured channel %d/%d span %d\n",
+ ast_log(LOG_WARNING, "INFO received on unconfigured channel %d/%d span %d\n",
PRI_SPAN(e->ring.channel), PRI_CHANNEL(e->ring.channel), pri->span);
} else {
chanpos = pri_fixup_principle(pri, chanpos, e->ring.call);
@@ -1457,7 +1457,7 @@
ast_mutex_lock(&pri->pvts[chanpos]->service_lock);
ch = pri->pvts[chanpos]->channel;
ast_mutex_unlock(&pri->pvts[chanpos]->service_lock);
-
+
snprintf(db_chan_name, sizeof(db_chan_name), "%s/%d:%d", dahdi_db, pri->pvts[chanpos]->pri->span, ch);
if (!ast_db_get(db_chan_name, SRVST_DBKEY, db_answer, sizeof(db_answer))) {
sscanf(db_answer, "%c:%d", &state, &why);
@@ -1507,19 +1507,19 @@
chanpos = pri_find_principle(pri, e->ring.channel);
/* if no channel specified find one empty */
if (chanpos < 0) {
- ast_log(LOG_WARNING, "Ring requested on unconfigured channel %d/%d span %d\n",
+ ast_log(LOG_WARNING, "Ring requested on unconfigured channel %d/%d span %d\n",
PRI_SPAN(e->ring.channel), PRI_CHANNEL(e->ring.channel), pri->span);
} else {
sig_pri_lock_private(pri->pvts[chanpos]);
if (pri->pvts[chanpos]->owner) {
if (pri->pvts[chanpos]->call == e->ring.call) {
- ast_log(LOG_WARNING, "Duplicate setup requested on channel %d/%d already in use on span %d\n",
+ ast_log(LOG_WARNING, "Duplicate setup requested on channel %d/%d already in use on span %d\n",
PRI_SPAN(e->ring.channel), PRI_CHANNEL(e->ring.channel), pri->span);
sig_pri_unlock_private(pri->pvts[chanpos]);
break;
} else {
/* This is where we handle initial glare */
- ast_debug(1, "Ring requested on channel %d/%d already in use or previously requested on span %d. Attempting to renegotiating channel.\n",
+ ast_debug(1, "Ring requested on channel %d/%d already in use or previously requested on span %d. Attempting to renegotiating channel.\n",
PRI_SPAN(e->ring.channel), PRI_CHANNEL(e->ring.channel), pri->span);
sig_pri_unlock_private(pri->pvts[chanpos]);
chanpos = -1;
@@ -1589,14 +1589,14 @@
pri->pvts[chanpos]->proceeding = 1;
pri_proceeding(pri->pri, e->ring.call, PVT_TO_CHANNEL(pri->pvts[chanpos]), 0);
} else {
- if (pri->switchtype != PRI_SWITCH_GR303_TMC)
+ if (pri->switchtype != PRI_SWITCH_GR303_TMC)
pri_need_more_info(pri->pri, e->ring.call, PVT_TO_CHANNEL(pri->pvts[chanpos]), 1);
else
pri_answer(pri->pri, e->ring.call, PVT_TO_CHANNEL(pri->pvts[chanpos]), 1);
}
/* Get the use_callingpres state */
pri->pvts[chanpos]->callingpres = e->ring.callingpres;
-
+
/* Start PBX */
if (!e->ring.complete
&& (pri->overlapdial & DAHDI_OVERLAPDIAL_INCOMING)
@@ -1644,7 +1644,7 @@
plancallingnum, S_OR(pri->pvts[chanpos]->exten, "<unspecified>"),
pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset, pri->span);
} else {
- ast_log(LOG_WARNING, "Unable to start PBX on channel %d/%d, span %d\n",
+ ast_log(LOG_WARNING, "Unable to start PBX on channel %d/%d, span %d\n",
pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset, pri->span);
if (c)
ast_hangup(c);
@@ -1704,7 +1704,7 @@
}
if (c && !ast_pbx_start(c)) {
ast_verb(3, "Accepting call from '%s' to '%s' on channel %d/%d, span %d\n",
- plancallingnum, pri->pvts[chanpos]->exten,
+ plancallingnum, pri->pvts[chanpos]->exten,
pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset, pri->span);
sig_pri_set_echocanceller(pri->pvts[chanpos], 1);
} else {
@@ -1720,7 +1720,7 @@
}
} else {
ast_verb(3, "Extension '%s' in context '%s' from '%s' does not exist. Rejecting call on channel %d/%d, span %d\n",
- pri->pvts[chanpos]->exten, pri->pvts[chanpos]->context, pri->pvts[chanpos]->cid_num, pri->pvts[chanpos]->logicalspan,
+ pri->pvts[chanpos]->exten, pri->pvts[chanpos]->context, pri->pvts[chanpos]->cid_num, pri->pvts[chanpos]->logicalspan,
pri->pvts[chanpos]->prioffset, pri->span);
pri_hangup(pri->pri, e->ring.call, PRI_CAUSE_UNALLOCATED);
pri->pvts[chanpos]->call = NULL;
@@ -1737,12 +1737,12 @@
case PRI_EVENT_RINGING:
chanpos = pri_find_principle(pri, e->ringing.channel);
if (chanpos < 0) {
- ast_log(LOG_WARNING, "Ringing requested on unconfigured channel %d/%d span %d\n",
+ ast_log(LOG_WARNING, "Ringing requested on unconfigured channel %d/%d span %d\n",
PRI_SPAN(e->ringing.channel), PRI_CHANNEL(e->ringing.channel), pri->span);
} else {
chanpos = pri_fixup_principle(pri, chanpos, e->ringing.call);
if (chanpos < 0) {
- ast_log(LOG_WARNING, "Ringing requested on channel %d/%d not in use on span %d\n",
+ ast_log(LOG_WARNING, "Ringing requested on channel %d/%d not in use on span %d\n",
PRI_SPAN(e->ringing.channel), PRI_CHANNEL(e->ringing.channel), pri->span);
} else {
sig_pri_lock_private(pri->pvts[chanpos]);
@@ -1804,7 +1804,7 @@
}
}
}
-
+
ast_log(LOG_DEBUG, "Queuing frame from PRI_EVENT_PROGRESS on channel %d/%d span %d\n",
pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset,pri->span);
pri_queue_frame(pri->pvts[chanpos], &f, pri);
@@ -1831,7 +1831,7 @@
e->proceeding.subcmds);
if (!pri->pvts[chanpos]->proceeding) {
struct ast_frame f = { AST_FRAME_CONTROL, AST_CONTROL_PROCEEDING, };
-
+
ast_log(LOG_DEBUG, "Queuing frame from PRI_EVENT_PROCEEDING on channel %d/%d span %d\n",
pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset,pri->span);
pri_queue_frame(pri->pvts[chanpos], &f, pri);
@@ -1870,16 +1870,16 @@
sig_pri_unlock_private(pri->pvts[chanpos]);
}
}
- break;
+ break;
case PRI_EVENT_ANSWER:
chanpos = pri_find_principle(pri, e->answer.channel);
if (chanpos < 0) {
- ast_log(LOG_WARNING, "Answer on unconfigured channel %d/%d span %d\n",
+ ast_log(LOG_WARNING, "Answer on unconfigured channel %d/%d span %d\n",
PRI_SPAN(e->answer.channel), PRI_CHANNEL(e->answer.channel), pri->span);
} else {
chanpos = pri_fixup_principle(pri, chanpos, e->answer.call);
if (chanpos < 0) {
- ast_log(LOG_WARNING, "Answer requested on channel %d/%d not in use on span %d\n",
+ ast_log(LOG_WARNING, "Answer requested on channel %d/%d not in use on span %d\n",
PRI_SPAN(e->answer.channel), PRI_CHANNEL(e->answer.channel), pri->span);
} else {
sig_pri_lock_private(pri->pvts[chanpos]);
@@ -1908,11 +1908,11 @@
sig_pri_unlock_private(pri->pvts[chanpos]);
}
}
- break;
+ break;
case PRI_EVENT_HANGUP:
chanpos = pri_find_principle(pri, e->hangup.channel);
if (chanpos < 0) {
- ast_log(LOG_WARNING, "Hangup requested on unconfigured channel %d/%d span %d\n",
+ ast_log(LOG_WARNING, "Hangup requested on unconfigured channel %d/%d span %d\n",
PRI_SPAN(e->hangup.channel), PRI_CHANNEL(e->hangup.channel), pri->span);
} else {
chanpos = pri_fixup_principle(pri, chanpos, e->hangup.call);
@@ -1979,10 +1979,10 @@
sig_pri_unlock_private(pri->pvts[chanpos]);
} else {
- ast_log(LOG_WARNING, "Hangup on bad channel %d/%d on span %d\n",
+ ast_log(LOG_WARNING, "Hangup on bad channel %d/%d on span %d\n",
PRI_SPAN(e->hangup.channel), PRI_CHANNEL(e->hangup.channel), pri->span);
}
- }
+ }
break;
#ifndef PRI_EVENT_HANGUP_REQ
#error please update libpri
@@ -1990,7 +1990,7 @@
case PRI_EVENT_HANGUP_REQ:
chanpos = pri_find_principle(pri, e->hangup.channel);
if (chanpos < 0) {
- ast_log(LOG_WARNING, "Hangup REQ requested on unconfigured channel %d/%d span %d\n",
+ ast_log(LOG_WARNING, "Hangup REQ requested on unconfigured channel %d/%d span %d\n",
PRI_SPAN(e->hangup.channel), PRI_CHANNEL(e->hangup.channel), pri->span);
} else {
chanpos = pri_fixup_principle(pri, chanpos, e->hangup.call);
@@ -2053,12 +2053,12 @@
} else {
ast_log(LOG_WARNING, "Hangup REQ on bad channel %d/%d on span %d\n", PRI_SPAN(e->hangup.channel), PRI_CHANNEL(e->hangup.channel), pri->span);
}
- }
+ }
break;
case PRI_EVENT_HANGUP_ACK:
chanpos = pri_find_principle(pri, e->hangup.channel);
if (chanpos < 0) {
- ast_log(LOG_WARNING, "Hangup ACK requested on unconfigured channel number %d/%d span %d\n",
+ ast_log(LOG_WARNING, "Hangup ACK requested on unconfigured channel number %d/%d span %d\n",
PRI_SPAN(e->hangup.channel), PRI_CHANNEL(e->hangup.channel), pri->span);
} else {
chanpos = pri_fixup_principle(pri, chanpos, e->hangup.call);
@@ -2101,15 +2101,15 @@
if (pri->pvts[x] && pri->pvts[x]->resetting) {
chanpos = x;
sig_pri_lock_private(pri->pvts[chanpos]);
- ast_log(LOG_DEBUG, "Assuming restart ack is really for channel %d/%d span %d\n", pri->pvts[chanpos]->logicalspan,
+ ast_log(LOG_DEBUG, "Assuming restart ack is really for channel %d/%d span %d\n", pri->pvts[chanpos]->logicalspan,
pri->pvts[chanpos]->prioffset, pri->span);
if (pri->pvts[chanpos]->owner) {
- ast_log(LOG_WARNING, "Got restart ack on channel %d/%d with owner on span %d\n", pri->pvts[chanpos]->logicalspan,
+ ast_log(LOG_WARNING, "Got restart ack on channel %d/%d with owner on span %d\n", pri->pvts[chanpos]->logicalspan,
pri->pvts[chanpos]->prioffset, pri->span);
ast_softhangup_nolock(pri->pvts[chanpos]->owner, AST_SOFTHANGUP_DEV);
}
pri->pvts[chanpos]->resetting = 0;
- ast_verb(3, "B-channel %d/%d successfully restarted on span %d\n", pri->pvts[chanpos]->logicalspan,
+ ast_verb(3, "B-channel %d/%d successfully restarted on span %d\n", pri->pvts[chanpos]->logicalspan,
pri->pvts[chanpos]->prioffset, pri->span);
sig_pri_unlock_private(pri->pvts[chanpos]);
if (pri->resetting)
@@ -2118,7 +2118,7 @@
}
}
if (chanpos < 0) {
- ast_log(LOG_WARNING, "Restart ACK requested on strange channel %d/%d span %d\n",
+ ast_log(LOG_WARNING, "Restart ACK requested on strange channel %d/%d span %d\n",
PRI_SPAN(e->restartack.channel), PRI_CHANNEL(e->restartack.channel), pri->span);
}
} else {
@@ -2130,7 +2130,7 @@
ast_softhangup_nolock(pri->pvts[chanpos]->owner, AST_SOFTHANGUP_DEV);
}
pri->pvts[chanpos]->resetting = 0;
- ast_verb(3, "B-channel %d/%d successfully restarted on span %d\n", pri->pvts[chanpos]->logicalspan,
+ ast_verb(3, "B-channel %d/%d successfully restarted on span %d\n", pri->pvts[chanpos]->logicalspan,
pri->pvts[chanpos]->prioffset, pri->span);
sig_pri_unlock_private(pri->pvts[chanpos]);
if (pri->resetting)
@@ -2141,7 +2141,7 @@
case PRI_EVENT_SETUP_ACK:
chanpos = pri_find_principle(pri, e->setup_ack.channel);
if (chanpos < 0) {
- ast_log(LOG_WARNING, "Received SETUP_ACKNOWLEDGE on unconfigured channel %d/%d span %d\n",
+ ast_log(LOG_WARNING, "Received SETUP_ACKNOWLEDGE on unconfigured channel %d/%d span %d\n",
PRI_SPAN(e->setup_ack.channel), PRI_CHANNEL(e->setup_ack.channel), pri->span);
} else {
chanpos = pri_fixup_principle(pri, chanpos, e->setup_ack.call);
@@ -2153,7 +2153,7 @@
/* Send any queued digits */
for (x = 0;x < strlen(pri->pvts[chanpos]->dialdest); x++) {
ast_log(LOG_DEBUG, "Sending pending digit '%c'\n", pri->pvts[chanpos]->dialdest[x]);
- pri_information(pri->pri, pri->pvts[chanpos]->call,
+ pri_information(pri->pri, pri->pvts[chanpos]->call,
pri->pvts[chanpos]->dialdest[x]);
}
sig_pri_unlock_private(pri->pvts[chanpos]);
@@ -2188,7 +2188,7 @@
default:
ast_log(LOG_DEBUG, "Event: %d\n", e->e);
}
- }
+ }
ast_mutex_unlock(&pri->lock);
}
/* Never reached */
@@ -2220,7 +2220,7 @@
ast_log(LOG_WARNING, "Asked to hangup channel not connected\n");
return 0;
}
-
+
p->owner = NULL;
p->outgoing = 0;
p->digital = 0;
@@ -2231,7 +2231,7 @@
p->rdnis[0] = '\0';
p->exten[0] = '\0';
sig_pri_set_dialing(p, 0);
-
+
if (!p->call) {
res = 0;
goto exit;
@@ -2264,9 +2264,9 @@
}
pri_hangup(p->pri->pri, p->call, icause);
}
- if (res < 0)
+ if (res < 0)
ast_log(LOG_WARNING, "pri_disconnect failed\n");
- pri_rel(p->pri);
+ pri_rel(p->pri);
} else {
ast_log(LOG_WARNING, "Unable to grab PRI on span %d\n", p->pri->span);
res = -1;
@@ -2354,11 +2354,11 @@
} else {
exclusive = 0;
}
-
+
pri_sr_set_channel(sr, PVT_TO_CHANNEL(p), exclusive, 1);
- pri_sr_set_bearer(sr, p->digital ? PRI_TRANS_CAP_DIGITAL : ast->transfercapability,
+ pri_sr_set_bearer(sr, p->digital ? PRI_TRANS_CAP_DIGITAL : ast->transfercapability,
(p->digital ? -1 : layer1));
-
+
if (p->pri->facilityenable)
pri_facility_enable(p->pri->pri);
@@ -2525,7 +2525,7 @@
#endif
if (pri_setup(p->pri->pri, p->call, sr)) {
- ast_log(LOG_WARNING, "Unable to setup call to %s (using %s)\n",
+ ast_log(LOG_WARNING, "Unable to setup call to %s (using %s)\n",
c + p->stripmsd + dp_strip, dialplan2str(p->pri->dialplan));
pri_rel(p->pri);
pri_sr_free(sr);
@@ -2567,7 +2567,7 @@
break;
case AST_CONTROL_RINGING:
if ((!p->alerting) && p->pri && !p->outgoing && (chan->_state != AST_STATE_UP)) {
- if (p->pri->pri) {
+ if (p->pri->pri) {
if (!pri_grab(p, p->pri)) {
pri_acknowledge(p->pri->pri,p->call, PVT_TO_CHANNEL(p), !p->digital);
pri_rel(p->pri);
@@ -2586,7 +2586,7 @@
case AST_CONTROL_PROCEEDING:
ast_debug(1,"Received AST_CONTROL_PROCEEDING on %s\n",chan->name);
if (!p->proceeding && p->pri && !p->outgoing) {
- if (p->pri->pri) {
+ if (p->pri->pri) {
if (!pri_grab(p, p->pri)) {
pri_proceeding(p->pri->pri,p->call, PVT_TO_CHANNEL(p), !p->digital);
pri_rel(p->pri);
@@ -2604,7 +2604,7 @@
ast_debug(1,"Received AST_CONTROL_PROGRESS on %s\n",chan->name);
p->digital = 0; /* Digital-only calls isn't allowing any inband progress messages */
if (!p->progress && p->pri && !p->outgoing) {
- if (p->pri->pri) {
+ if (p->pri->pri) {
if (!pri_grab(p, p->pri)) {
#ifdef HAVE_PRI_PROG_W_CAUSE
pri_progress_with_cause(p->pri->pri,p->call, PVT_TO_CHANNEL(p), 1, -1); /* no cause at all */
@@ -2628,7 +2628,7 @@
chan->_softhangup |= AST_SOFTHANGUP_DEV;
res = 0;
} else if (!p->progress && p->pri && !p->outgoing) {
- if (p->pri) {
+ if (p->pri) {
if (!pri_grab(p, p->pri)) {
#ifdef HAVE_PRI_PROG_W_CAUSE
pri_progress_with_cause(p->pri->pri,p->call, PVT_TO_CHANNEL(p), 1, PRI_CAUSE_SWITCH_CONGESTION); /* cause = 42 */
@@ -2719,7 +2719,7 @@
#ifdef HAVE_PRI_SERVICE_MESSAGES
char db_chan_name[20], db_answer[5], state;
int why = 0;
-
+
snprintf(db_chan_name, sizeof(db_chan_name), "%s/%d:%d", dahdi_db, p->pri->span, p->channel);
if (!ast_db_get(db_chan_name, SRVST_DBKEY, db_answer, sizeof(db_answer))) {
sscanf(db_answer, "%c:%d", &state, &why);
@@ -2769,7 +2769,7 @@
{
int x;
int i;
-
+
ast_mutex_init(&pri->lock);
for (i = 0; i < NUM_DCHANS; i++) {
Modified: team/group/issue14068/channels/sig_pri.h
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/issue14068/channels/sig_pri.h?view=diff&rev=210153&r1=210152&r2=210153
==============================================================================
--- team/group/issue14068/channels/sig_pri.h (original)
+++ team/group/issue14068/channels/sig_pri.h Mon Aug 3 12:24:21 2009
@@ -91,7 +91,7 @@
#define SRVST_DBKEY "service-state"
/*! \brief The out-of-service SERVICE state */
#define SRVST_TYPE_OOS "O"
-/*! \brief SRVST_INITIALIZED is used to indicate a channel being out-of-service
+/*! \brief SRVST_INITIALIZED is used to indicate a channel being out-of-service
* The SRVST_INITIALIZED is mostly used maintain backwards compatibility but also may
* mean that the channel has not yet received a RESTART message. If a channel is
* out-of-service with this reason a RESTART message will result in the channel
@@ -151,7 +151,7 @@
struct ast_channel *owner;
- struct sig_pri_pri *pri;
+ struct sig_pri_pri *pri;
q931_call *call; /*!< opaque libpri call control structure */
int prioffset; /*!< channel number in span */
More information about the asterisk-commits
mailing list