dect
/
asterisk
Archived
13
0
Fork 0

Fix some whitespace issues

git-svn-id: http://svn.digium.com/svn/asterisk/trunk@11817 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
markster 2006-03-04 18:12:02 +00:00
parent 09e80638b5
commit 6946ee9011
1 changed files with 15 additions and 15 deletions

View File

@ -4299,24 +4299,24 @@ static struct ast_frame *zt_handle_event(struct ast_channel *ast)
}
break;
case ZT_EVENT_POLARITY:
/*
* If we get a Polarity Switch event, check to see
* if we should change the polarity state and
* mark the channel as UP or if this is an indication
* of remote end disconnect.
*/
if (p->polarity == POLARITY_IDLE) {
p->polarity = POLARITY_REV;
if (p->answeronpolarityswitch &&
((ast->_state == AST_STATE_DIALING) ||
(ast->_state == AST_STATE_RINGING))) {
ast_log(LOG_DEBUG, "Answering on polarity switch!\n");
ast_setstate(p->owner, AST_STATE_UP);
/*
* If we get a Polarity Switch event, check to see
* if we should change the polarity state and
* mark the channel as UP or if this is an indication
* of remote end disconnect.
*/
if (p->polarity == POLARITY_IDLE) {
p->polarity = POLARITY_REV;
if (p->answeronpolarityswitch &&
((ast->_state == AST_STATE_DIALING) ||
(ast->_state == AST_STATE_RINGING))) {
ast_log(LOG_DEBUG, "Answering on polarity switch!\n");
ast_setstate(p->owner, AST_STATE_UP);
if (p->hanguponpolarityswitch) {
gettimeofday(&p->polaritydelaytv, NULL);
}
} else
ast_log(LOG_DEBUG, "Ignore switch to REVERSED Polarity on channel %d, state %d\n", p->channel, ast->_state);
} else
ast_log(LOG_DEBUG, "Ignore switch to REVERSED Polarity on channel %d, state %d\n", p->channel, ast->_state);
}
/* Removed else statement from here as it was preventing hangups from ever happening*/
/* Added AST_STATE_RING in if statement below to deal with calling party hangups that take place when ringing */