Simplified dahdi_request() channel selection failed reason/cause code.

Also avoid potential crash because cause could be NULL.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@251585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Richard Mudgett
2010-03-10 16:55:34 +00:00
parent ee5e65194f
commit b1ccb1a44e
5 changed files with 22 additions and 32 deletions

View File

@@ -649,17 +649,11 @@ struct ast_channel * analog_request(struct analog_pvt *p, int *callwait, const s
return analog_new_ast_channel(p, AST_STATE_RESERVED, 0, p->owner ? ANALOG_SUB_CALLWAIT : ANALOG_SUB_REAL, requestor);
}
int analog_available(struct analog_pvt *p, int *busy)
int analog_available(struct analog_pvt *p)
{
int offhook;
ast_log(LOG_DEBUG, "%s %d\n", __FUNCTION__, p->channel);
/* We're at least busy at this point */
if (busy) {
if ((p->sig == ANALOG_SIG_FXOKS) || (p->sig == ANALOG_SIG_FXOLS) || (p->sig == ANALOG_SIG_FXOGS)) {
*busy = 1;
}
}
/* If do not disturb, definitely not */
if (p->dnd) {
return 0;